Class ContentBaseExtensions
Provides extension methods to IContentBase to get URL segments.
Inheritance
System.Object
Namespace: Umbraco.Extensions
Assembly: Umbraco.Core.dll
Syntax
public static class ContentBaseExtensions
Methods
View SourceGetUrlSegment(IContentBase, IShortStringHelper, IEnumerable<IUrlSegmentProvider>, String, Boolean)
Gets the URL segment for a specified content and culture.
Declaration
public static string GetUrlSegment(this IContentBase content, IShortStringHelper shortStringHelper, IEnumerable<IUrlSegmentProvider> urlSegmentProviders, string culture = null, bool published = true)
Parameters
Type | Name | Description |
---|---|---|
IContentBase | content | The content. |
IShortStringHelper | shortStringHelper | |
IEnumerable<IUrlSegmentProvider> | urlSegmentProviders | |
System.String | culture | The culture. |
System.Boolean | published | Whether to get the published or draft. |
Returns
Type | Description |
---|---|
System.String | The URL segment. |