Class DefaultUrlSegmentProvider
Default implementation of IUrlSegmentProvider.
Inheritance
object
Namespace: Umbraco.Cms.Core.Strings
Assembly: Umbraco.Core.dll
Syntax
public class DefaultUrlSegmentProvider : IUrlSegmentProvider
Constructors
View SourceDefaultUrlSegmentProvider(IShortStringHelper)
Declaration
public DefaultUrlSegmentProvider(IShortStringHelper shortStringHelper)
Parameters
| Type | Name | Description |
|---|---|---|
| IShortStringHelper | shortStringHelper |
Methods
View SourceGetUrlSegment(IContentBase, bool, string?)
Gets the URL segment for a specified content, published status and and culture.
Declaration
public virtual string? GetUrlSegment(IContentBase content, bool published, string? culture = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IContentBase | content | The content. |
| bool | published | |
| string | culture | The culture. |
Returns
| Type | Description |
|---|---|
| string | The URL segment. |
Remarks
This is for when Umbraco is capable of managing more than one URL per content, in 1-to-1 multilingual configurations. Then there would be one URL per culture.
GetUrlSegment(IContentBase, string?)
Gets the URL segment for a specified content and culture.
Declaration
public virtual string? GetUrlSegment(IContentBase content, string? culture = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IContentBase | content | The content. |
| string | culture | The culture. |
Returns
| Type | Description |
|---|---|
| string | The URL segment. |