Taking Notez – Island Pond Consulting

Notes from My Work with Salesforce and Cloud Technologies

Posts Tagged ‘web sphere portal

Adding Dynmaic Content to WebSphere Portal Themes

leave a comment »

Not all who follow my blog visit the Davalen blog.  It really is a good one and worth your time.  I have brought my recent contribution to that blog here in hopes that others will find it helpful.  By the way, we are at the Exceptional Web Experience Conference.  Drop by if you can,

Here’s the original article:  One purpose of theme customization is to enrich a site by delivering some content ubiquitously. Though delivery of most content is accomplished through portlets delivery, in a theme provides delivery of the same content throughout pages in the site that employ the same theme. That is, as a user navigates from page to page, certain content is consistently displayed.  Out of the box examples of this approach are illustrated by the search widget, help link, username display, etc.

There are two logical approaches to delivering content in a theme: client-side logic and server-side logic. Client-side logic consists of JavaScript, iWidget, and live text that is stored in a WebDAV file store and is referenced in the file theme.html. A significant benefit of client-side logic is offloading of content aggregation to the browser. Further, the development of these components can be delegated to web designers using conventional web design tools.

Server-side logic consists of Java Server Pages (JSPs). JSPs cannot be stored in WebDAV and directly referenced in the file theme.html, as they rely on a servlet context for lifecycle events.

In many cases an organization may have an existing repository of JSPs they wish to leverage in their new customized WebSphere Portal theme. To do this there are three tasks to perform: develop the content such as a JSP, configure the application server environment, and insert dynamic content spots into the file theme.html.

A web application developer can create the JSPs and related resources for delivery of dynamic content. Additionally, such a developer may be engaged to customize other dynamic providers associated with a custom theme. These artifacts are deployed in a WAR which is a member of an EAR file. The operational management and deployment of theme artifacts is covered in the supplemental documentation for the product here.

A WebSphere administrator will log on to the Integrated Solutions Console of the application server and navigate to: Resources -> Resource Environment -> Resource environment providers -> WP DynamicContentSpotMappings.

A new Custom Property will be defined by entering an arbitrary name to serve as the ID of the mapping. In addition, a URI value used to locate the dynamic content is entered.  The format will vary but the syntax is similar to this:


The third task is to define the dynamic content spot in the theme.html file. This task will require knowledge of the dynamic spot mapping ID defined by the administrator. The following is an example of a dynamic content spot tag:

<link rel=”dynamic-content” href=”dyn-cd:id:<mapping-ID-provided-by-administrator>

If you are developing on a live server, clear the browser cache, and load the page bound to your custom theme to view the result.

Written by David Wilkerson

May 22, 2012 at 10:33 am