Namespace: Ingeniux.CMS
Assembly: Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 9.0.565.0 (9.0.565)
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: IPageThe created new Page
Exception | Condition |
---|---|
ArgumentNullException | When the "schema" parameter is null |
ArgumentException | When "isDummy" is false, and either "parentPage" is Recycle Folder, or "schema" is in Draft mode. |
SecurityException | When "isDummy" is false, and either Operating User doesn't have the right to Create Pages, or doesn't have full access to the "parentPage". |
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.