Table of Contents

Class CreateWebPageParameters

Namespace
CMS.Websites
Assembly
CMS.Websites.dll

Create web page parameters.

public sealed class CreateWebPageParameters
Inheritance
object
CreateWebPageParameters
Extension Methods

Constructors

CreateWebPageParameters(string, string, ContentItemParameters)

Initializes a new instance of CreateWebPageParameters.

public CreateWebPageParameters(string displayName, string languageName, ContentItemParameters contentItemParameters)

Parameters

displayName string

Name of the web page for use in UI.

languageName string

Language codename of the web page.

contentItemParameters ContentItemParameters

Data needed to create an underlying content item for a new web page.

Remarks

Name will be generated automatically.

Exceptions

ArgumentException

Thrown when displayName or languageName is null or empty or when VersionStatus is set to draft.

ArgumentNullException

Thrown when contentItemParameters is null.

See Also

CreateWebPageParameters(string, string, string, ContentItemParameters)

Initializes a new instance of CreateWebPageParameters.

public CreateWebPageParameters(string name, string displayName, string languageName, ContentItemParameters contentItemParameters)

Parameters

name string

Code name of the web page.

displayName string

Name of the web page for use in UI.

languageName string

Language codename of the web page.

contentItemParameters ContentItemParameters

Data needed to create an underlying content item for a new web page.

Exceptions

ArgumentException

Thrown when name, displayName or languageName is null or empty, when name is not a valid code name or when VersionStatus is set to draft.

ArgumentNullException

Thrown when contentItemParameters is null.

Properties

ContentItemParameters

Data needed to create an underlying content item.

public ContentItemParameters ContentItemParameters { get; }

Property Value

ContentItemParameters

DisplayName

Web page display name.

public string DisplayName { get; }

Property Value

string

GenerateName

Indicates if web page's Name should be automatically generated.

public bool GenerateName { get; }

Property Value

bool

LanguageName

Language codename of the language variant in which the web page will be created.

public string LanguageName { get; }

Property Value

string

Name

Code name of the web page.

public string Name { get; }

Property Value

string

Remarks

Code name has to consist of upper and lower case letters, numbers, dash or underscore. This value can be null if GenerateName is set to true leading to automatic generation of code name.

See Also
IsCodeName(object, bool)

ParentWebPageItemID

Identifier of parent web page. Not specified if a web page has no parent.

public int ParentWebPageItemID { get; set; }

Property Value

int

RequiresAuthentication

Indicates if web page item requires authentication. By default, item will be created without the need for authentication.

public bool RequiresAuthentication { get; set; }

Property Value

bool

ScheduledPublishWhen

Date and time when the web page should be published.

public DateTime? ScheduledPublishWhen { get; set; }

Property Value

DateTime?

Remarks

Setting System.DateTime.MinValue is treated as null.

ScheduledUnpublishWhen

Date and time when the web page should be unpublished.

public DateTime? ScheduledUnpublishWhen { get; set; }

Property Value

DateTime?

Remarks

Setting System.DateTime.MinValue is treated as null.

UrlSlug

Web page URL slug.

public string UrlSlug { get; set; }

Property Value

string

Remarks

URL slug will be derived from the display name if not provided.

VersionStatus

Version status in which the new language variant will be created. Default status is InitialDraft. Not used when creating a new variant for folders.

public VersionStatus VersionStatus { get; set; }

Property Value

VersionStatus

Remarks

You cannot create web page in Draft version. First create a Published version, then create a Draft using TryCreateDraft(int, string, CancellationToken).

Exceptions

ArgumentException

Thrown when you attempt to set the VersionStatus to Draft.