Sample XML for deploying custom Themes and Skins

Custom Theme and Skins creation involves creation of WAR file and then importing theme xml so that portal should have your theme entry under Themes and Skins section of portal. Once it is done, you can then apply thems to portal pages.

My first article on themes and skin was Creating custom Thems and Skins in WebSphere Portal
This article is second part to that because importing of theme xml comes after deployment of theme WAR.

Use this below xml to import your theme into portal.
P.S -  In below xml MyTheme referes to theme name which is actually a folder name under your theme project/<WebContent>/themes/html/MyTheme.

<?xml version="1.0" encoding="UTF-8"?>
<request
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="PortalConfig_6.1.0.xsd"
type="update" create-oids="true">

<portal action="locate">
<!--
Sample for deploying themes and skins in an XML script. Note that this
created only the database entries;
you still need to provide the rendering JSPs under the resource root
directories specified in the XML.
-->
<skin action="update" active="true" objectid="NoSkin"
uniquename="wps.skin.noSkin" resourceroot="NoSkin" >
<localedata locale="en">
<title>NoSkin</title>
<description>A skin with no skin</description>
</localedata>
</skin>

<theme action="update" active="true" defaultskinref="NoSkin"
uniquename="ibm.portal.theme.MyTheme"
resourceroot="MyTheme"
context-root="/MyTheme">
<localedata locale="en">
<title>MyTheme</title>
</localedata>

<!--
 There's only one skin that can  be combined with this theme.
-->
<allowed-skin skin="NoSkin" update="set"/>
</theme>
</portal>
</request>


No comments: