Click or drag to resize

ISiteCreatePage Method (ISchema, String, IPage, Boolean, Boolean)


Creates a new Page with specific Schema.

Namespace:  Ingeniux.CMS
Assembly:  Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 10.6.308
Syntax
IPage CreatePage(
	ISchema schema,
	string pageName,
	IPage parentPage,
	bool insertAtBeginning = false,
	bool isDummy = false
)

Parameters

schema
Type: Ingeniux.CMSISchema
The schema to have the new Page based on
pageName
Type: SystemString
Name of the new Page
parentPage
Type: Ingeniux.CMSIPage
The parent Page to create the new Page under
insertAtBeginning (Optional)
Type: SystemBoolean
Whether to place the Page before or after the existing child Pages
isDummy (Optional)
Type: SystemBoolean
Whether to create a Dummy Page or not. Dummy Pages are temporary, therefore, parameters "parentPage" and "insertAtBeginning" don't matter

Return Value

Type: IPage
The created new Page
Exceptions
ExceptionCondition
ArgumentNullExceptionWhen the "schema" parameter is null
ArgumentExceptionWhen "isDummy" is false, and either "parentPage" is Recycle Folder, or "schema" is in Draft mode.
SecurityExceptionWhen "isDummy" is false, and either Operating User doesn't have the right to Create Pages, or doesn't have full access to the "parentPage".
Remarks

When "isDummy" is true, the created Page is temporary. It will not be saved to Content Store. Therefore, no security validations will apply. Anybody can create a dummy Page.

If "parentPage" parameter value is null, the new Page will be created under the Site Root.

If "pageName" is null or empty, it will be default to one empty space.

"schema" must be specified, or error will be thrown.

The "schema" cannot be in draft mode, when "isDummy" is false, or error will be thrown.

If "parentPage" is the Recycle Folder, error will be thrown.

The event "PageCreated" will be fired upon page creation, if "isDummy" is false.

See Also