Click or drag to resize

SiteTreeServicesCreateNewPage Method


Creates a new Page or Components, from either Page Creation Rule or Schema specified.

Namespace:  IngeniuxCMService
Assembly:  IngeniuxCMService (in IngeniuxCMService.dll) Version: 10.5.94
Syntax
public XHRServiceResponseGeneric<PageActionOutput> CreateNewPage(
	string parentId,
	string pageName,
	string ruleId,
	string schemaId,
	string ss,
	string userID,
	string pubTargetId,
	bool useSchemaName = false,
	bool insertAtEnd = false
)

Parameters

parentId
Type: SystemString
Id of the parent Page to create the new Page under
pageName
Type: SystemString
Name of the new Page
ruleId
Type: SystemString
Id of the Page Creation Rule to use for Page Creation. Page Creation Rule is higher priority over Schema on this operation
schemaId
Type: SystemString
Id of the Schema to use for Page creation
ss
Type: SystemString
Name of the XSLT stylesheet file to assign to created Page. Only applies in Page Creation Rule scenario
userID
Type: SystemString
Id of the User to assign the Page to after creation. If left null or empty, Page will be assigned to current User
pubTargetId
Type: SystemString
Id of the current Publishing Target
useSchemaName (Optional)
Type: SystemBoolean
If true, allow schemaId value to be the Schema Friendly Name instead of Schema ID.
insertAtEnd (Optional)
Type: SystemBoolean
If true, creates the page as the last child object within its parent node in the site tree.

Return Value

Type: XHRServiceResponseGenericPageActionOutput

Object containing information of the action and property of the created Page

Examples
Sample JSON return
JavaScript
{
    "code": 0,
    "error": null,
    "message": {
        "pageAction": "newpage",
        "pageProperties": {
            "name": "Detail",
            "allowedCategoryRoots": [],
            "ancestors": ["x1", "x2", "x112", "x116"],
            "assignedGroup": null,
            "assignedUser": {
                "name": "Turtle Master",
                "email": "awang@ingeniux.com",
                "userId": "INGENIUX\\awang"
            },
            "canClaimPage": false,
            "canTranslate": false,
            "checkedOut": true,
            "error": null,
            "icon": 2,
            "isAssignedToOtherUser": false,
            "isEditable": true,
            "isInWorkflow": false,
            "justRecycled": false,
            "languageRootId": "x112",
            "lingualMaps": {
                "clones": [],
                "master": null
            },
            "locale": "en-us",
            "localeInherited": true,
            "markedForPublish": false,
            "markedForPublishAny": false,
            "markedForPublishPropagated": false,
            "nextPageId": null,
            "nextPageIndex": 0,
            "noDnd": false,
            "numChildPages": 0,
            "pageId": "x124",
            "parentId": null,
            "pendingMasterVersion": 0,
            "referenceProps": {
                "created": "20140130T19:04:22",
                "createdBy": "INGENIUX\\awang",
                "endDate": "00010101T00:00:00",
                "lastModified": "20140130T19:04:22",
                "lastModifiedBy": "User\/INGENIUX___awang",
                "publishAs": "",
                "startDate": "00010101T00:00:00"
            },
            "remoteServer": "",
            "schemaFriendlyName": null,
            "schemaName": "Details",
            "schemaOnLatestVersion": false,
            "securityLevel": 2,
            "userCanCopyPage": true,
            "workflow": null
        },
        "queryString": {
            "pageName": "Detail",
            "parentPageId": "x116",
            "schemaFile": "schemas\/194"
        }
    }
}
Remarks

If Page doesn't exist, returns error status

If Page Creation Rule or Schema Id is specified, but don't exist, returns error status

If Page Creation Id is specified, uses Page Creation Rule to create the Page; Otherwise, uses Schema to create the Page

Specified "ss" XSLT stylesheet doesn't affect Page creation with Schema at all

Created new Page is checked out and assigned to specified User

If "userId" is not specified, Page will be assigned to current User

See Also