Search Results for

    Show / Hide Table of Contents
    View Source

    Class VariationContext

    Represents the variation context.

    Inheritance
    object
    Namespace: Umbraco.Cms.Core.Models.PublishedContent
    Assembly: Umbraco.Core.dll
    Syntax
    public class VariationContext

    Constructors

    View Source

    VariationContext(string?, string?)

    Initializes a new instance of the VariationContext class.

    Declaration
    public VariationContext(string? culture = null, string? segment = null)
    Parameters
    Type Name Description
    string culture
    string segment

    Properties

    View Source

    Culture

    Gets the culture.

    Declaration
    public string Culture { get; }
    Property Value
    Type Description
    string
    View Source

    Segment

    Gets the segment.

    Declaration
    public string Segment { get; }
    Property Value
    Type Description
    string

    Methods

    View Source

    GetSegment(int)

    Gets the segment for the content item.

    Declaration
    public virtual string GetSegment(int contentId)
    Parameters
    Type Name Description
    int contentId

    The content Id.

    Returns
    Type Description
    string
    View Source

    GetSegment(int, string)

    Gets the segment for the content item and property alias.

    Declaration
    public virtual string GetSegment(int contentId, string propertyAlias)
    Parameters
    Type Name Description
    int contentId

    The content Id.

    string propertyAlias

    The property alias.

    Returns
    Type Description
    string
    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX