by David Wilkerson, CTO
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.
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 184.108.40.206 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.
This article is from our monthly resource e-Newsletter. Did you miss it in your inbox? Visit our eNewsletter archives for past editions or if you want to receive our monthly newsletter automatically, simply write to Ruth Jarvis and request to be added to our E-Newsletter list. Thank you!