How to preview the correct version of a style resource when you are working in IBM WCM Projects


Because working with static stylesheet files on a IBM WCM 8 project can be tedious, in this post I will share an easy way to enable the use of the draft version of a stylesheet in WCM, allowing you to preview the changes you're working on in the WCM project.

Let say you have a stylesheet as a piece of content and it is called inside a common HTML - Header component. You probably have something like:

Additionally, you are working in some improvements on your portal and those improvements involve making some changes to that stylesheet. In this case, you simply add the stylesheet to the project, update it with the changes/corrections/improvement and preview the project and....wait, where are your changes? Why WCM still using the current published version of your stylesheet and not the draft version??

My teammate Iván Santiesteban and I discovered that by default IBM WCM 8 will not use the draft version of the stylesheet that you are working on in the project when you try to preview it. So, if you want to preview the modifications made to the css stylesheets all you need to do is modify the reference to the stylesheet (the draft version) adding the following variables in the href parameter:



These changes will allow IBM WCM 8 to call the draft version of the stylesheet when you preview the project you are working on.

Don't forget: when you are ready to publish the project, remove the HTML Component and cancel/delete the draft, since it was used only to test the changes on the stylesheet.

To summarize, the process is:

  1. Add the Stylesheet to the project
  2. Add the HTML Component to the project
  3. Edit the HTML Component to reference the draft stylesheet
  4. When you are ready to publish the project, remove the HTML Component and cancel the draft

About the author

Enterprise Web Developer
Joaquin is an Enterprise Web Developer at Base22 with over seven years of experience designing and developing web solutions for enterprise clients. He is a well rounded web developer with skills building interfaces in IBM WebSphere Portal and WCM, IBM Connections, and many others. He is an Oracle Certified Java Developer and a Microsoft Certified Visual Studio Developer. He blogs at