In today's blog post we will look at some some of the questions I received from customers in regards to developing a Portal 8 or 8.5 theme.
1. How to find out which dojo classes are included in which of the modules that we define Out of the Box?
2. I made a change to theme_en.html or another html file in my static theme war file but why does it not become visible?
You need to hit Ctrl + F5. This will cause the correct cache headers to flow to the server and the files will be updated. The exception is for layout.html files. For the layout files you need to restart the Portal server for the change to become visible if creating an ear based theme.
3. Why are request parameters getting lost between dynamic content spot JSP's?
Portal provides an isolation between dynamic content spots - request parameters are hidden between the dynamic content spots. Parameters set in Default.jsp will be visible though throughout the different dynamic content spots. If you create a map object as a request parameter in the Default.jsp you can store and retrieve parameters in that map between the dynamic content spots.
The same holds true for externally passed in request parameters that come in e.g. as query parameters. They can be retrieved inside Default.jsp and be made available to the dynamic content spots but not be retrieved directly from within the dynamic content spots.
4. Is there a limit of how many CSS rules in a single file can be interpreted by the older versions of Microsoft Internet Explorer?
Yes - as documented here: http://support.microsoft.com/kb/262161
If you are using the theme resource aggregation Portal combines the css files for you and that can lead to larger CSS files than Microsoft Internet Explorer can handle you can influence how large the CSS files become for a single request by setting the following property in WP ConfigService:
5. Issues with caching of ra:collection URLs?
My colleague Stephan has recently written a great article on how to debug cachability issues with the static resource requests:
6. Is there a quick way to get to an ear based theme?
There are a few step by step documents that document the process but for 8.5 a faster way is to leverage the sample ear based theme that is shipped in form of a paa file (Portal Application Archive) here:
Unzip the paa file (a paa file can simply be renamed to a zip file) and browse to the WARTheme85 directory:
- in the installableApps\ear directory you will find the WARTheme85.ear file - this can be imported into Rational Application Developer or Eclipse or your J2EE development environment of choice
- in the content\xmlaccess\install directory you will find the xmlaccess script that can be used to install the theme
You can then adjust the theme as needed - e.g. define your own context root for the theme or modify the functionality.
Currently the theme paa is based upon 8.5 CF0 - if you want to use the new functionality provided with later CFs you will need to reapply those changes to your theme.
7. How can I add CTC functionality to my ear based theme?
When installing CTC (Content Templating Catalog) the webdav store is updated with various files needed for CTC. If you have a custom theme you need to redo those changes in your theme. That means copying the new files into your static war file:
- CTC folder
- ctc.json into the contributions folder
- a bunch of profiles going into the profiles directory
- CtcLayouts.json and CtcStyles.json in the system directory
For webdav themes the metadata.properties file is being updated with the following entries:
For ear based themes the metadata.properties file is not used and those properties need to be defined via XMLAccess for the theme - e.g.:
<parameter name="ibm.portal.shelf.layout.json.ctclayouts" type="string" update="set"> <![CDATA[war:MyStaticContextRoot/themes/MyTheme/system/CtcLayouts.json]]> </parameter> <parameter name="ibm.portal.shelf.style.json.ctcstyles" type="string" update="set"> <![CDATA[war:MyStaticContextRoot/themes/MyTheme/system/CtcStyles.json]]> </parameter>