Promoting a page using the Portal Scripting Interface
View the Portal Scripting Interface syntax for promoting content.
Use this property to promote the content page or hierarchy on the target server.
JACL syntax for promoting a page:$Publish promotePage targetserver userid password pageuniquenameinteger_value include_children [true|false]
Example JACL code snippet for promoting a page:$Publish promotePage http://reclabl101.rtp.raleigh.ibm.com:10040/wps/mycontenthandler wpsadmin wpsadmin com.ibm.portal.published_testPage 0 true
target_server userid passwordProvide the target server URL, user ID, and password with the appropriate values for environment.
page_uniquenameFor the page unique name provide the object ID of page.
integer_valueSpecify an integer value after the page name to determine how you want the pages and hierarchy to be published. When you run the scripting command, the process compares the subtree hierarchy of the page that you are promoting on the source and target portals and then adds, replaces, or deletes nodes and customized preferences according to the specified integer value as follows:
0This option adds, replaces, and removes pages and nodes on the target portal to exactly match the sub tree of the published version. It preserves customized preferences to replaced pages.
1This option adds and replaces pages and nodes on the target portal by those from the published version and leaves sub nodes and pages that are not affected unchanged. It preserves customized preferences to replaced pages.
2This option adds, replaces, and removes pages and nodes on the target portal to exactly match the sub tree of the published version. It overwrites customized preferences to replaced pages.
3This option adds and replaces pages and nodes on the target portal by those from the published version and leaves sub nodes and pages that are not affected unchanged. It overwrites customized preferences to replaced pages.
There is a known issue with the promote options that include the removal of the customization data. The customization is not removed at this time. As a workaround you can do the following:
- Export the page or pages that you have promoted with the descending nodes by using the Manage Pages portlet or the XML configuration interface.
- Adapt the result file: Delete all the nodes from the customization domain domain="cust" by setting the action attribute of those <content-node> tags to action="delete" . Also remove nested tags within that <content-node> , as the syntax of the XML configuration interface does not allow subelements in a delete action.
- To remove the customization for these pages, import the modified result file into the portal by using the XML configuration interface.
include_children [true|false]This parameter determines whether children of the page will be published along with the page. Specify true or false.
Portal Scripting Interface extension for site management
Publish a page using the Portal Scripting Interface
Demoting a page using the Portal Scripting Interface
Example scripts for site management