Untitled Document
Abstract - This article discusses how to deploy Theme Styles within Portal
6.1
Table
of Contents | Next | Previous
4.4.4 Deploying Theme Styles
As mentioned earlier, when no additional functionality is required, or
changes to page layout or new elements are needed in the theme, generally a new
theme policy and/or style will be sufficient to modify the appearance of your
site. A theme style and policy can be used to “select colors, fonts,
graphics, turn areas of the page on and off, and adjust the settings for areas
of the page such as the navigation.” The theme policy is used to turn
portions of the page on or off and adjust settings of those areas that are
rendered, such as control the menu bread crumbs. These elements are
controlled by modifying policy attributes and applying the policy to one or
more pages. While not all out of the box themes will support all policy
attributes, you can find the list of attributes in the Info Center . The
theme style is used to modify the colors, fonts, and graphics displayed by the
theme.
The following section discusses theme styles and policies and provides a
specific example of how to move a theme style from one environment to another.
(References for this section can be reviewed in the References Section at the end of the
document.)
Theme Style versus Theme Policy
There are a few differences between Theme Style and Theme Policy. They are
as follows:
Theme Style
You create a new Theme Style using the Portal Administration, under
Portal User Interface > Theme Customizer .
You can edit a Theme Style using the Theme Customizer.
You can remove a Theme Style using the Theme Customizer.
You can apply a Theme Style to a page using the Theme Customizer or the
Manage Pages portlet. The Manage Pages portlet treats a Theme Style as a Theme
Policy.
Theme Policy
You create a new Theme Policy using the XML Configuration Interface.
You can not edit a Theme Policy using the Theme
Customizer.
You can update a Theme Policy using the XML Configuration Interface
(xmlaccess).
You can not delete a Theme Policy using the Theme
Customizer.
You can remove a Theme Policy using the XML Configuration Interface
(xmlaccess).
You can apply a Theme Policy to a page using the Manage Pages portlet or
the XML Configuration Interface. The process to transfer both artifacts from
one server to the other is the same.
Scenario: Moving a theme style from one server to another
In order to transfer a Theme Style from one server to another, you have to
follow the same procedure to export and import a Theme Policy using the XML
Configuration Interface.
A Theme Style can be treated as a Theme Policy. Alternatively, a Theme
Policy can not be treated as a Theme Style.
In our scenario, we have created a new Theme Style on the development
machine and transferred it to our staging server. This is described in the
steps below.
Export the Theme Style from the development machine
- Create an XML file that will be used to export your Theme Style. In this
example, we will export the Theme Style “RiverBendStyle”, and the
exportRiverBendStyle.xml will be used for that:
exportRiverBendStyle.xml |
<?xml version="1.0"
encoding="UTF-8"?>
<request
xsi:noNamespaceSchemaLocation="PortalConfig_1.4.xsd"
create-oids="true" type="export"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<portal action="locate">
<policy-node
action="export" label="WebPage"
type="theme" path="RiverBendStyle">
<url>file:///c:/temp/RiverBendStyle.xml</url>
</policy-node>
</portal>
</request> |
- Copy the exportRiverBendStyle.xml to <PortalServer>/bin directory
- Use the XML configuration interface, xmlaccess.bat script, in order to
export the Theme Style. The command below will generate a file called
RiverBendStyle.xml under the C:\temp directory:
<PortalServer>/bin/xmlaccess.bat –in
exportRiverBendStyle.xml –url http://<development>:10040/wps/config -user
wasadmin -pwd <password>
- The theme file has been exported successfully if the following message is
displayed:
<status element=”all” result=”ok”/> .
Example:

- The Theme Style will be exported into the file RiverBendStyle.xml under
C:\temp directory. This file represents the Theme Style XML definition
- Copy the generated file RiverBendStyle.xml to the target machine
Import the Theme Style to the staging machine
- Copy the generated file RiverBendStyle.xml to the
<PortalServer>/bin directory.
- Create an XML file that will be used to import your Theme Style.
importRiverBendStyle.xml |
<?xml version="1.0"
encoding="UTF-8"?>
<request xsi:noNamespaceSchemaLocation="PortalConfig_1.4.xsd"
create-oids="true" type="update"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<portal action="locate">
<policy-node
action="update" label="WebPage" type=""
path="">
<url>file:///c:/WebSphere/PortalServer/bin/RiverBendStyle.xml
</url>
</policy-node>
</portal>
</request> |
- Copy the importRiverBendStyle.xml to the <PortalServer>/bin
directory
<PortalServer>/bin/xmlaccess.bat –in
importRiverBendStyle.xml –url http://<development>:10040/wps/config -user
wasadmin -pwd <password>
- The theme file has been imported successfully if the following message is
displayed:
<status element=”all” result=”ok”/>
Example:

- Your new Theme Style will appear in the list of available Theme Styles:

Note:
You can use the same procedure to transfer a Theme Style from staging to
production. When you have a clustered environment, you can choose one of the
cluster members to be the target server. As this is a change made at a database
level, you only have to do it once. |
References Section
References for this article include:
Abstract - This article discusses how to deploy Theme Styles within Portal 6.1