Click or drag to resize

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


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.308
Syntax
IPage CreatePage(
	IPageCreationRule pcr,
	string pageName,
	IPage overrideParentPage = null,
	bool dontAddToWorkFlow = false,
	string userId = ""
)

Parameters

pcr
Type: Ingeniux.CMSIPageCreationRule
The Page Creation Rule to use to create the new Page
pageName
Type: SystemString
Name of the new Page
overrideParentPage (Optional)
Type: Ingeniux.CMSIPage
The Parent Page to create the new Page under. It must be in the list of allowed Parent Pages of the "pcr"
dontAddToWorkFlow (Optional)
Type: SystemBoolean
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 (Optional)
Type: SystemString
The "Id" of the User to assign the created Page to, if the "dontAddToWorkFlow" parameter is true

Return Value

Type: 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