ISiteCreatePage Method (ISchema, String, IPage, Boolean, Boolean) |
Namespace: Ingeniux.CMS
IPage CreatePage( ISchema schema, string pageName, IPage parentPage, bool insertAtBeginning = false, bool isDummy = false )
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.