Web content associations
Web content associations allow us to combine portal pages and associated web content items managed by IBM Web Content Manager Web content associations map portal pages to the site structure in the IBM WCM system. We can define a default content association and multiple other associations, used for dynamic page resolution. For each page, there is also a system content association that maps the page to its corresponding portal page site area in the Portal Site library. We also have the option of using page template instantiation to trigger the copying of web content into the Portal Site Library or another library. This option is set by a page template parameter. Each web content association consists of a reference to a portal page and a reference to a site area in a web content library. When a page contains a web content association, web content viewers added to the page can automatically render the content provided by the associated site area. In addition, a web content page template containing an association can create copies of associated content when creating a page using the template. When multiple associations are defined for the same web content page, one of those associations is identified as the default content association. When creating a page and Managed Pages are enabled on the system, a system content association is automatically created to the corresponding portal page site area in the Portal Site Library. This system content association is designated as the default association, but we can change that setting later as needed.
The default content association has several uses:
- When we add a web content viewer to the page without configuring the viewer to reference content, it renders the content indicated by the default association.
- When creating a page from a web content page template, the default content association of the page template indicates the site area to be copied during page instantiation.
- For a friendly URL to content on the page, the default association indicates the path to the rendered content. This content path fragment is appended to the friendly URL of the current page to generate the complete friendly URL.
All content associations for a page are used for dynamic page resolution. The portal uses dynamic page resolution to determine the best matching page for rendering a specific content item.
We can also configure each web content association to enable or disable page-based access control when rendering content from the mapped site area. With this feature, users who are authorized to view the page are also assumed to have view access for content under the associated site area.
Web content associations are managed by the content mapping service of the portal. We can manipulate web content associations with the following methods:
- The Page Associations window available in the site toolbar through Page > General > Details > Default site area.
- The page properties available from the Manage Pages portlet
- XML configuration interface, using the xmlaccess command
- Portal Scripting Interface
- REST API for content associations
- Public Java API for the content mapping service
Page context and user context
The content associations of a page can define the initial web content context of the page. This context is used for rendering when users first access a page. The context of the page can change when users interact with the content on the page. Each web content viewer on the page can be configured with an explicit context that overrides the rendering page context. The context of the portlet can also change if it is configured to receive links. When users click a link within the viewer configured to broadcast its links, the page context is updated. This new context is maintained until users click another link on this page or until users start a new session. When users start a new session, the original page context is used.
Content copying triggered by page template instantiation
When the page template parameter...
ibm.portal.instantiation.content.dynamic.copy.target.selection = true
...the default content association that references a library other than the Portal Site Library is copied into the Portal Site library during page instantiation. This allows us to store associated web content outside of the Portal Site library and have this content that is copied into the Portal Site library during page template instantiation. Using a separate library for the page templates is useful to update the library independently of the Portal Site Library, either through importing and exporting or syndication. A separate library is also helpful if we use the same content items on several page templates.
This parameter does not affect web content associated with page templates through system content associations, such as web content stored in the Portal Site Library. Such content is always copied to the new page site area associated with the new page.
If the parent page of the new page has both a system content association with the Portal Site library and a default content association that references another library, use the parameter...
ibm.portal.instantiation.content.preferred.copy.target parameter
...to identify the copy target location...
To copy the the content into the Portal Site Library...
ibm.portal.instantiation.content.preferred.copy.target=internal
To copy the content to the other library associated with the parent page (default)...
ibm.portal.instantiation.content.preferred.copy.target=template
Set page parameters on the web content page templates using Page Properties > Advanced in the Manage Pages portlet or using Page > General > Edit Page Properties > Advanced in the site toolbar.
Parent Deliver contentRelated concepts:
Web content pages and templates
Enable page-based access control for web content pages
Content associations reference
XML configuration interface and content associations
Portal Scripting Interface and content associations
REST API and content associations
Java API for Content Mapping Service