Class VariationContext
Represents the variation context.
Inheritance
System.Object
Namespace: Umbraco.Core.Models.PublishedContent
Assembly: Umbraco.Core.dll
Syntax
public class VariationContext
Constructors
View SourceVariationContext(String, String)
Initializes a new instance of the VariationContext class.
Declaration
public VariationContext(string culture = null, string segment = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | culture | |
System.String | segment |
Properties
View SourceCulture
Gets the culture.
Declaration
public string Culture { get; }
Property Value
Type | Description |
---|---|
System.String |
Segment
Gets the segment.
Declaration
public string Segment { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
View SourceGetSegment(Int32)
Gets the segment for the content item
Declaration
public virtual string GetSegment(int contentId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | contentId |
Returns
Type | Description |
---|---|
System.String |