Search Results for

    Show / Hide Table of Contents
    View Source

    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 Source

    AllowAdditionalSegments

    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.Boolean
    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 Source

    GetUrlSegment(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
    IContentBase content

    The content.

    System.Boolean published
    System.String culture

    The culture.

    Returns
    Type Description
    System.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.

    View Source

    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
    IContentBase content

    The content.

    System.String culture

    The culture.

    Returns
    Type Description
    System.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.

    • Improve this Doc
    • View Source
    In This Article
    • Properties
      • AllowAdditionalSegments
    • Methods
      • GetUrlSegment(IContentBase, Boolean, String)
      • GetUrlSegment(IContentBase, String)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX