Click or drag to resize
IPageAttachmentUrlExtensionsWithVariant Method
Provides page attachment URL variant name for responsible images feature.

Namespace: Kentico.Content.Web.Mvc
Assembly: Kentico.Content.Web.Mvc (in Kentico.Content.Web.Mvc.dll) Version: 13.0.131
Syntax
C#
public static IPageAttachmentUrl WithVariant(
	this IPageAttachmentUrl url,
	string variantName
)

Parameters

url
Type: Kentico.Content.Web.MvcIPageAttachmentUrl
Page attachment URL.
variantName
Type: SystemString
Identifier of the attachment variant.

Return Value

Type: IPageAttachmentUrl
New instance of IPageAttachmentUrl based on the current state modified by the parametrization.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IPageAttachmentUrl. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks
The original page attachment URL instance is not modified by the parametrization.
See Also