Click or drag to resize

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


Creates a new Page based on a Page Creation Rule.

Namespace: Ingeniux.CMS
Assembly: Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 10.6.492
Syntax
IPage CreatePage(
	IPageCreationRule pcr,
	string pageName,
	IPage overrideParentPage = null,
	bool dontAddToWorkFlow = false,
	string userId = ""
)

Parameters

pcr  IPageCreationRule
The Page Creation Rule to use to create the new Page
pageName  String
Name of the new Page
overrideParentPage  IPage  (Optional)
The Parent Page to create the new Page under. It must be in the list of allowed Parent Pages of the "pcr"
dontAddToWorkFlow  Boolean  (Optional)
Whether to add the created Page to Workflow, if the "pcr" has Workflow Definition tie-in already. If not, this parameter has no impact
userId  String  (Optional)
The "Id" of the User to assign the created Page to, if the "dontAddToWorkFlow" parameter is true

Return Value

IPage
The created new Page
Exceptions
ExceptionCondition
ArgumentNullExceptionWhen "pcr" parameter is null
ArgumentExceptionWhen "pcr" doesn't have any Parent Pages and "overrideParentPage" is null, or "overrideParentPage" is not in the allow Parent Pages for the "pcr".
SecurityExceptionWhen Operating User doesn't have full access to the actual parent Page.
Remarks

"pcr" parameter cannot be null, or error will be thrown.

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

When "overrideParentPage" is not null, it must be allowed for the "pcr" as a Parent Page to create new Pages under; When it is null, the "pcr"'s First accessible Parent Page will be used as parent Page.

The parameter "userId" doesn't have to be specified. If not specified, the new Page will be assigned to either the Default Transition 's Default User, to the Transitions's Next Group.

The event "PageCreated" will be fired upon page creation.

See Also