Class VariationContextAccessorExtensions
Provides extension methods for IVariationContextAccessor.
Inheritance
Namespace: Umbraco.Extensions
Assembly: Umbraco.Core.dll
Syntax
public static class VariationContextAccessorExtensions
Methods
View SourceContextualizeVariation(IVariationContextAccessor, ContentVariation, int, string?, ref string?, ref string?)
Contextualizes the variation based on the content variation settings, content ID, and property alias.
Declaration
public static void ContextualizeVariation(this IVariationContextAccessor variationContextAccessor, ContentVariation variations, int contentId, string? propertyAlias, ref string? culture, ref string? segment)
Parameters
| Type | Name | Description |
|---|---|---|
| IVariationContextAccessor | variationContextAccessor | The variation context accessor. |
| ContentVariation | variations | The content variation settings. |
| int | contentId | The content ID. |
| string | propertyAlias | The property alias. |
| string | culture | The culture, which may be set based on the variation context. |
| string | segment | The segment, which may be set based on the variation context. |
ContextualizeVariation(IVariationContextAccessor, ContentVariation, int, ref string?, ref string?)
Contextualizes the variation based on the content variation settings and content ID.
Declaration
[Obsolete("Please use the method overload that accepts all parameters. Scheduled for removal in Umbraco 18.")]
public static void ContextualizeVariation(this IVariationContextAccessor variationContextAccessor, ContentVariation variations, int contentId, ref string? culture, ref string? segment)
Parameters
| Type | Name | Description |
|---|---|---|
| IVariationContextAccessor | variationContextAccessor | The variation context accessor. |
| ContentVariation | variations | The content variation settings. |
| int | contentId | The content ID. |
| string | culture | The culture, which may be set based on the variation context. |
| string | segment | The segment, which may be set based on the variation context. |
ContextualizeVariation(IVariationContextAccessor, ContentVariation, string?, ref string?, ref string?)
Contextualizes the variation based on the content variation settings and property alias.
Declaration
public static void ContextualizeVariation(this IVariationContextAccessor variationContextAccessor, ContentVariation variations, string? propertyAlias, ref string? culture, ref string? segment)
Parameters
| Type | Name | Description |
|---|---|---|
| IVariationContextAccessor | variationContextAccessor | The variation context accessor. |
| ContentVariation | variations | The content variation settings. |
| string | propertyAlias | The property alias. |
| string | culture | The culture, which may be set based on the variation context. |
| string | segment | The segment, which may be set based on the variation context. |
ContextualizeVariation(IVariationContextAccessor, ContentVariation, ref string?, ref string?)
Contextualizes the variation based on the content variation settings.
Declaration
[Obsolete("Please use the method overload that accepts all parameters. Scheduled for removal in Umbraco 18.")]
public static void ContextualizeVariation(this IVariationContextAccessor variationContextAccessor, ContentVariation variations, ref string? culture, ref string? segment)
Parameters
| Type | Name | Description |
|---|---|---|
| IVariationContextAccessor | variationContextAccessor | The variation context accessor. |
| ContentVariation | variations | The content variation settings. |
| string | culture | The culture, which may be set based on the variation context. |
| string | segment | The segment, which may be set based on the variation context. |