Click or drag to resize
VariantHelperGetVariantID Method
Return variant ID based on name and page template ID

Namespace: CMS.PortalEngine
Assembly: CMS.PortalEngine (in CMS.PortalEngine.dll) Version: 9.0.0
Syntax
C#
public static int GetVariantID(
	VariantModeEnum type,
	int pageTemplateID,
	string variantName,
	Nullable<bool> documentIdIsNull = null
)

Parameters

type
Type: CMS.PortalEngineVariantModeEnum
Type of variant
pageTemplateID
Type: SystemInt32
Variant's page template ID
variantName
Type: SystemString
Variant's name
documentIdIsNull (Optional)
Type: SystemNullableBoolean
If set, adds check to SQL query whether the variant document id is null or not

Return Value

Type: Int32
See Also