Create a web content page with xmlaccess.sh
As with other portal pages, we can create a web content page with the XML configuration interface (xmlaccess command). Page definition is similar to a standard portal page. However, there is an additional page parameter that specifies the site area associated with the web content page.
- When creating the xmlaccess command, specify the page parameters as we would for a standard portal page.
Here is an example:
<content-node action="update" content-parentref="parentOID" domain="rel" objectid="someOID" preserve-old-layout="true" type="page"> <content-mapping-info> <content-mapping content-id="/mylibrary2/sitearea2" default="true" delegated-access-level="User"/> <content-mapping content-id="ddccb7ed-8485-48c8-b875-31d17d9da65b" default="false"/> </content-mapping-info> </content-node>The value of the content-id attribute can be either the ID or the path to the web content item. If we are using the content path, the value must begin with the forward slash character (/) followed by the library name. When creating a web content page using the content path, we cannot build the path from the Display title fields of the items in the path. Instead use the Name fields of the items when specifying the path.
- Because the web content viewer uses public render parameters to identify the content to render, include the page parameter param.sharing.scope when creating your xmlaccess command.
Set the value for the parameter to ibm.portal.sharing.scope.page.
Here is an example parameter definition for web content pages when using the XML configuration interface:
<parameter name="com.ibm.portal.wcm.contentroot" type="string" update="set"> <![CDATA[/mylib/mysite/mysitearea]]> </parameter> <parameter name="param.sharing.scope" type="string" update="set"> <![CDATA[ibm.portal.sharing.scope.page]]> </parameter>
- When creating the xmlaccess command, add at least one web content viewer configured to listen to other portlets and make dynamic broadcasts. Adding the viewer ensures that content selected for this page is rendered correctly and that links between pages work properly.
Here is an example of how to add the web content viewer using the XML configuration interface:
<component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="7_U796BB1A0OS250IOS7F1BP3081" ordinal="100" orientation="H" skinref="undefined" type="container" width="undefined"> <component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="7_U796BB1A0OS250IOS7F1BP3085" ordinal="100" orientation="V" skinref="undefined" type="container" width="undefined"> <component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="7_U796BB1A0OS250IOS7F1BP3087" ordinal="100" skinref="undefined" type="control" width="undefined"> <portletinstance action="update" domain="rel" objectid="5_U796BB1A0OS250IOS7F1BP3083" portletref="3_U796BB1A008OD0IOS2ODAD28U4"> <preferences name="WCM_BROADCASTS_TO" update="set"> <value><![CDATA[WCM_LINKING_DYNAMIC]]></value> </preferences> <preferences name="WCM_LISTENS_TO" update="set"> <value><![CDATA[WCM_LINKING_OTHER]]></value> </preferences> </portletinstance> </component> </component> </component>Migration note: After Version 6.1.5, the format used by the XML configuration interface to represent content associations for a web content page has changed. Typically, the migration process automatically converts all existing web content pages to the updated format. However, if we create web content pages on the older portal after migration and then import the pages to the v8.5 portal, the page format is incompatible. In this case, manually run the action-migrate-content-mappings configuration task on the v8.5 portal to convert the new web content pages to the v8.5 format.
To perform the conversion
WP_PROFILE/ConfigEngine:
./ConfigEngine.sh action-migrate-content-mappings -DWasPassword=foo -DPortalAdminPwd=foo
Parent Advanced administrative examplesRelated concepts:
xmlaccess.sh
Public render parameters
REST API and content associations
Package com.ibm.portal.services.contentmapping