+

Search Tips   |   Advanced Search

Helper class samples for web content context

We can create the helper classes PortletWCMContextHelper, PortalWCMContextHelper and WCMContextHelper from the sample code provided here to programmatically determine the current web content context. The context indicates a content item or site area that is rendered by a web content viewer.

Important: These helper classes are not provided by default with IBM Web Content Manager. Example code is provided here that we can take and use to implement the classes yourself.

The helper classes can be used by custom themes or custom portlets that need to render information that is related to the current context.

The web content viewer determines the context to be rendered by evaluating several conditions in the following order:

  1. Private render parameter

  2. path-info parameter

  3. Public render parameter

  4. Portlet configuration setting for the web content viewer

  5. Web content association defined for the page
The viewer evaluates each condition in turn until it finds a valid context. As soon as the viewer finds a context, remaining conditions are not evaluated.

Private render parameters and portlet configuration settings are visible only to the web content viewer. However, path-info parameters, public render parameters, and content associations are visible to all portlets on a page and to portal code (for example, in a theme).


Parent: Developing