Customising a WebSphere Portal Theme - Remove Signup and Edit My Profile Link
Friday, September 11, 2009 at 1:54PM
Adam Brown in Collaboration, Portal, WebSphere

I have recently had the requirement to customise a Portal Theme a couple of times and every time I do it I fall for the same gotcha's so I thought I would document the process so I can remember next time. I recently modified a Theme to remove the Signup and Edit My Profile Links. Dave Hay shows us one way of doing this using XMLAccess however sometimes modifying the theme is required for other reasons as well.

The main reference on how to do this is the Info Center (http://publib.boulder.ibm.com/infocenter/wpdoc/v6r1/index.jsp?topic=/com.ibm.wp.ent.doc_v6101/dev/dgn_crthm.html) however there are a couple of steps that arn't terribly clear so I have recorded what I did below here.

The easiest way to build a theme is to take an exiting one and modify it.

First copy an existing Theme
Copy the following directories and files contained within -
...\wp_profile\installedApps\portal1\wps.ear\wps.war\themes\dojo
...\wp_profile\installedApps\portal1\wps.ear\wps.war\themes\html\Portal
...\wp_profile\installedApps\portal1\wps.ear\wps.war\themes\html\psw

Then copy all of the tld files from the WEB-INF/tld directory in wps.war into the theme WAR's WEB-INF/tld directory in order to get support for all the custom tags used for themes and skins.

I found the description of the above a little confusing so maybe this screen shot helps to explain what the directory structure of your new theme should be.

Image:Brownies Blog - Customising a WebSphere Portal Theme - Remove Signup and Edit My Profile Link

Now to modify the Theme (to remove the Self Care links)
Now you can modify the theme quite dramatically but here I just want to remove the selfcare and signup links.

Find banner_toolbar.jspf in the html/MyThemeName directory and edit it. Now basically what we need to do is comment out the appropriate bits. Don't be mislead by the comments in the document as they arn't exactly worded well. Basically you just need to comment out the sections that refer to the selfcare and signup
Image:Brownies Blog - Customising a WebSphere Portal Theme - Remove Signup and Edit My Profile Link

Now a key step/gotcha in the process is to Edit and Save Default.jsp as well. This updates the timestamp so that Default.jsp will be recompiled with the updated jspf elements. It seems that if you don't do this then it just doesn't work.

Package & Deploy the Theme
This part wasn't so bad. Just follow the doco - http://publib.boulder.ibm.com/infocenter/wpdoc/v6r1/index.jsp?topic=/com.ibm.wp.ent.doc_v6101/dev/dgn_crthm.html

Importing a Theme
and again this part isn't too bad. http://publib.boulder.ibm.com/infocenter/wpdoc/v6r1/index.jsp?topic=/com.ibm.wp.ent.doc_v6101/dev/dgn_crthm.html

So once all that is done all you do is apply the Theme to your Portal pages. You might need to flush your cache and if you use a Proxy that cache's as well you might need to refresh that.

Article originally appeared on Adam Brown - Collaboration Blueprint (http://www.collaborationblueprint.com.au/).
See website for complete article licensing information.