Create own theme

The best way to start creating own custom theme is by copying the portal Page Builder theme. This ensures that theme has all the required elements for the theme to function.

Before you create a new theme, see the topic about the Location of theme resources and familiarize yourself with the types of resources the theme includes and the location of those resources. Do not modify the Page Builder theme directly, as this theme can be updated by service fix packs and override changes.

To create a new theme proceed as follows:

  1. Mount the /themelist WebDAV entry point with WebDAV client:

      /WpsContextRoot/mycontenthandler/dav/themelist/

      Replace WpsContextRoot with the value of WpsContextRoot if you have changed it.

  2. Copy and rename the folder of the theme on which you want to base new theme.

      The /themelist WebDAV entry point does not support the copy action directly. If you encounter an error when you copy and paste theme folders within /themelist, do the following:

      1. Copy the theme folder to local file system.

      2. Give the theme a new title by editing the appropriate localized_locale.properties file under the metadata folder. If you do not change the theme title, the portal will show multiple themes with the same titles in selection lists.

      3. Copy the new folder to the /themelist folder.

      After you have completed these steps, new theme is defined in the portal database. If you do not see new theme in the Themes and Skins or Page Properties portal administration portlets, edit a theme that you find listed, then press OK without making any updates. This refreshes the theme model list; new theme should now show. As an alternative, you can also restart the portal.

You can now assign the theme to pages as required. To customize theme, edit the theme files in WebDAV.

To perform administrative customization, for example to the title, description, or metadata of the theme, continue to use the /themelist/ entry point. To customize the templates and static resources, use the /fs-type1/ entry point. At this point theme still points to the same Default.jsp and dynamic content spots as the portal Page Builder theme. If you have problems using the /themelist/ entry point, try /themelist/all , as some WebDAV clients have issues listening without the all .
Change the theme template location

The theme contains a metadata parameter that stores the location of the theme template theme.html . This parameter is named com.ibm.portal.theme.template.ref . Its value can point to an external location if required, for example to a POC URI or an external server. Therefore the theme template does not need to be stored on WebDAV. In a default portal installation the metadata parameter for the Page Builder theme looks like this:

<parameter name="com.ibm.portal.theme.template.ref" type="string" update="set">
           <! [CDATA [dav:fs-type1/themes/PageBuilder2/]]&gt;</parameter>


Develop custom themes
Use WebDAV to manage themes and skins
Location of theme resources

  Minor change Added assistance for working with the XML configuration interface Jan 5, 2011 12:48:45 PM Jan 5, 2011 12:48:18 PM update to the WebDAV entry point update to the WebDAV entry point Minor change Minor change Minor change More formatting changes Moved result of step 3 out a level. Reformatted numbering in an attempt to add a new step 3. Add step to refresh the list of themes to make the new theme show Submitted by John De Binder on Jan 20, 2011 10:55:02 AM

Recommendation: Change theme name

Sorry, should have said in the "metadata/localized*.properties" files. Can't edit my previous comment. Submitted by John De Binder on Jan 20, 2011 10:51:01 AM

Recommendation: Change theme name

I highly recommend that the first thing to modify in new theme directory is the name of the theme in the nls files. This is the name that shows up in the admin portlet and if you don't change it you will have two "Page Builder" themes Submitted by Don Naro on Nov 15, 2010 6:12:08 AM

Create own theme: wp7

Updated the /themelist entry point according to this technote: http://www-01.ibm.com/support/docview.wss?uid=swg21450124 Submitted by Kristofer Einarsson on Oct 20, 2010 8:00:27 PM

Create own theme: wp7

I had to do the following but I am not sure if it the right way to do it:

Go into WebDAV in /wps/mycontenthandler/fs-type1/themes and create a

new copy of PageBuilder2 called TestTheme. To create a new skin go into

/wps/mycontenthandler/fs-type1/skins and create a new folder there

called TestNoSkin.

Run the following xmlaccess:

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:noNamespaceSchemaLocation="PortalConfig_7.0.0.xsd"

type="update" create-oids="true">

resourceroot="TestNoSkin" type="default" uniquename="csa2.testnoskin">

TestTheme - No Skin

[CDATA[template]]>

update="set">

resourceroot="TestTheme" context-root="/TestTheme">

TestTheme

[CDATA[CSA2]]>

[CDATA[2.1]]>

[CDATA[1.4.3]]>

update="set">>

update="set">

update="set">

Some parameter are not accessible in Portal Admin so running xmlaccess seems to be required.

Create and deploy TestTheme.war using PageBuilder2.war as the base and

this in web.xml:

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

id="TestTheme"

version="2.4"

xsi:schemaLocation=

"http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-

app_2_4.xsd">

TestTheme

TestTheme and TestNoSkin works!

Submitted by Reinhard Brosche on Oct 20, 2010 12:00:58 PM

Create own theme: wp7

Remove the additional step again. This is a code defect and will be fixed soon. Meanwhile a Tech Note will be written. Submitted by Reinhard Brosche on Oct 18, 2010 1:26:54 PM

Create own theme: wp7

The missing step has been added. Submitted by Jeff Burkholder on Oct 8, 2010 12:31:10 PM

Create own theme: wp7

I tried this, it didn't work -- that entry point wouldn't let me copy/paste anything. Found another article (Location_of_theme_resources_wp7) saying /fs-type1/themes/ is for creating, updating and that lets me copy to my drive where I renamed it, made changes and pasted it back. But, the new theme doesn't show up anywhere in the admin portlets or page builder. Some additional steps needed?


+

Search Tips   |   Advanced Search