Click or drag to resize
SampleWebPartsGeneratorEnsureWebpart Method
Creates a web part if it doesn't exist.

Namespace: CMS.DancingGoat.Samples
Assembly: CMS.DancingGoat.Samples (in CMS.DancingGoat.Samples.dll) Version: 11.0.0
Syntax
C#
public static void EnsureWebpart(
	string webPartName,
	string webPartDisplayName,
	string webPartFilePath,
	Nullable<int> webPartResourceId = null
)

Parameters

webPartName
Type: SystemString
Web part code name.
webPartDisplayName
Type: SystemString
Web part display name.
webPartFilePath
Type: SystemString
Web part file path.
webPartResourceId (Optional)
Type: SystemNullableInt32
Id of the module.
See Also