WebSphere Portal: Theme Development Useful References

WebSphere Portal API

WebSphere Portal Library Tags | link
Our trusty library tags since WebSphere Portal 6.0 (maybe earlier)!
(The tags mentioned are only for use in theme and skin JSPs. Do not use portal tags in portlet JSPs.)

  • <portal-core/> tags – Used to provide portal core functionality such as entering the main render flow as well as URL-related aspects of the page.
  • <portal-dynamicui/> tags – Used to enable dynamic user interface features such as closing dynamic portlets and pages.
  • <portal-fmt/> tags – Used to provide enhanced portal formatting capabilities.
  • <portal-logic/> tags – Used to provide conditional logic.
  • <portal-navigation/> tags – Used to implement navigation tasks such as generating URLs and traversing the portal navigation model.
  • <portal-showtools/> tags – Used to provide administrative tools on the theme and skin level.
  • <portal-skin/> tags – Used to build a portlet title bar as well as make various functional icons available in the title bar.
  • <portal-theme-ext/> tags – Used to provide extended functionality to enhance the portal themes.

WebSphere Portal EL Beans | link
Since WebSphere Portal 7.0, Expression Language (EL) beans has been added for easy access to WebSphere Programming models. The beans are accessed in the global wp namespace. For more information on specific models, refer to the Portal 8.5 SPI Javadoc external link. Examples of the common used beans:

  • ${wp.metadata[node]}
  • ${wp.node.contentNode}
  • ${wp.identification[node]}
  • ${wp.node.metadata[‘metaDataKey’]}
  • ${wp.navigationModel}

Missing from the documentation:

  • “INTERNALURL” is missing from ContentNodeBean.contentNodeType documentation.

WebSphere Portal EL Available Variables (WebSphere Portal 8.0)
Do remember to check out bootstrap.jspf before init your variables, as some of the useful variables have already been initialized by the jsp fragment. Examples:

  • ${pageTitle} – current page’s title
  • ${currentNavNode} – current page’s navigation node
  •  ${aggMD} – an aggregated metadata of the current page
  • ${deviceClass} – device class, values available [<empty string>/tablet/smartphone]

Setting Dynamic Content Spot Mapping with mvc:URI | link
The mvc:URI scheme is a special URI format that accesses different resources, depending on the device class. This scheme is used by the Portal 8001 theme in the definition of several dynamic content spots. Example of possible combinations:

  • mvc:res:/hello.jsp: Uses a single default URI.
  • mvc:res:/hello.jsp,smartphone@res:/hello_smartphone.jsp: Uses res:/hello.jsp as the default URI and res:/hello_smartphone.jsp as the URI for smartphones.
  • mvc:res:/hello.jsp,smartphone/tablet@res:/hello_mobile.jsp: Uses res:/hello.jsp as the default URI and res:/hello_mobile.jsp as the URI for smartphones and tablets.
  • mvc:res:/hello.jsp,smartphone@,tablet@res:/hello_tablet.jsp: Uses res:/hello.jsp as the default URI and res:/hello_tablet.jsp as the URI for tablets. No URI is assigned for smartphones.

Leave a Reply

Your email address will not be published. Required fields are marked *