Interface IUrlSegmentProvider
Provides URL segments for content.
Namespace: Umbraco.Cms.Core.Strings
Assembly: Umbraco.Core.dll
Syntax
public interface IUrlSegmentProvider
Remarks
Url segments should comply with IETF RFCs regarding content, encoding, etc.
Properties
View SourceAllowAdditionalSegments
Gets a value indicating whether the URL segment provider allows additional segments after providing one.
Declaration
virtual bool AllowAdditionalSegments { get; }
Property Value
Type | Description |
---|---|
System. |
Remarks
If set to true, when more than one URL segment provider is available, futher providers after this one in the collection will be called even if the current provider provides a segment. If false, the provider will terminate the chain of URL segment providers if it provides a segment.
Methods
View SourceGetUrlSegment(IContentBase, Boolean, String)
Gets the URL segment for a specified content, published status and and culture.
Declaration
virtual string GetUrlSegment(IContentBase content, bool published, string culture = null)
Parameters
Type | Name | Description |
---|---|---|
IContent |
content | The content. |
System. |
published | |
System. |
culture | The culture. |
Returns
Type | Description |
---|---|
System. |
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
string GetUrlSegment(IContentBase content, string culture = null)
Parameters
Type | Name | Description |
---|---|---|
IContent |
content | The content. |
System. |
culture | The culture. |
Returns
Type | Description |
---|---|
System. |
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.