Monday, 25 June 2012

Portal theme customization->

1)C:\IBM\WebSphere\PortalServer\installer\wp.ear\installableApps\wps_theme.ear\wps_theme.war go to this path and copy file from it and paste it in a separate folder .

2)Remove the skins folder in it because we will be using portal skin which is already available.
\our temp folder \themes\html inside that change the name of portal to your context root name
3)Go to web-inf in your newly created folder and change the web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <display-name>WPS Theme Enterprise Application</display-name>
</web-app>


4) The above is the example of web.xml change the id and display-name to your required name

5)Package the folder inside the zip and rename it to war(the files that are in our temporary folder)
if it not works go to folder options view and uncheck the (hidden fileds show type option)

6)Go was admin and deploy this war in applications->new Applications->follow next --> and deploy it

7)Give the context path for it select the server as websphere_portal server

8)After deploying start your server from list of applications.

9)Go wps and go to import xml  and make a xml as this format


<?xml version="1.0" encoding="UTF-8"?>
<!--
 =================================================================
 * Licensed Materials - Property of IBM
 * (c) Copyright IBM Corp. 2008.  All rights reserved.
 *
 * US Government Users Restricted Rights - Use, duplication or
 * disclosure restricted by GSA ADP Schedule Contract with IBM
 * Corp.
 *
 * DISCLAIMER OF WARRANTIES.  The following [enclosed] code is
 * sample code created by IBM Corporation.  This sample code is
 * not part of any standard or IBM product and is provided to you
 * solely for the purpose of assisting you in the development of
 * your applications.  The code is provided "AS IS", without
 * warranty of any kind.  IBM shall not be liable for any damages
 * arising out of your use of the sample code, even if they have
 * been advised of the possibility of such damages.
 *
 =================================================================
-->

<request
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="PortalConfig_7.0.0.xsd"
    type="update" create-oids="true">
    <portal action="locate">
        <!-- Sample for deploying themes and skins in an XML script.
             Note that this only created the database entries;
             you still need to provide the rendering JSPs by
             deploying the corresponding web module under the
             specified context root in the application server. -->

        <skin action="update" active="true" objectid="hedgehogSkin" uniquename="ibm.portal.skin.Hedgehog" resourceroot="Hedgehog" context-root="/hh">
            <localedata locale="en">
                <title>Hedgehog</title>
                <description>A skin with lots of spikes!</description>
            </localedata>
        </skin>
        <theme action="update" active="true" defaultskinref="hedgehogSkin" uniquename="ibm.portal.theme.Forest" resourceroot="your context roo" context-root="/your context root">
            <localedata locale="en">
                <title>A natural theme</title>
            </localedata>
            <!-- There's only one skin that may be combined with this theme. -->
            <allowed-skin skin="hedgehogSkin" update="set"/>
        </theme>

    </portal>
</request>
10) go to portal server  themes and skins there you can see the theme created by you if not refresh

No comments:

Post a Comment

Custom single threaded java server

 package com.diffengine.csv; import java.io.*; import java.net.*; import java.util.Date; public class Server { public static void main(Str...