Bind the theme to the context root of the web app
- Create file input.xml with the following content...
<?xml version="1.0" encoding="UTF-8"?> <request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PortalConfig_8.0.0.xsd" type="export" create-oids="true" > <portal action="locate"> <skin action="export" objectid="*" /> <theme action="export" objectid="*" /> </portal> </request>
- Export all skin and theme definitions...
cd PORTAL_HOME/bin
xmlaccess.sh -user wpadmin -password foo -url hostname:10039/wps/config -in /path/to/input.xml -out output.xml
- Edit output.xml and search for the title of the theme, such as Custom Theme.
Scroll up to the line with the surrounding <theme> tag; it is likely the last <theme> tag in the file.
- Modify it from:
<theme action="update" active="true" context-root="/wps/defaultTheme80" default="false" domain="rel" objectid="ZJ_MLSU3F54089F00IP6G7P3F10S5" resourceroot="dynamicSpots">...to...
<theme action="update" active="true" context-root="/customTheme" default="false" domain="rel" objectid="ZJ_MLSU3F54089F00IP6G7P3F10S5" resourceroot="dynamicSpots" uniquename="customTheme">...setting the correct context-root and uniquename for the theme.
- Search for the title of the skin. Scroll up to the line with the surrounding <skin> tag; it is likely the last <skin> tag in the file.
Modify it from:
<skin action="update" active="true" context-root="/wps/defaultTheme80" default="false" domain="rel" objectid="ZK_73OKBB1A088IE0I5O7IP2J0G77" resourceroot="Hidden" type="default">...to...
<skin action="update" active="true" context-root="/customTheme" default="false" domain="rel" objectid="ZK_73OKBB1A088IE0I5O7IP2J0G77" resourceroot="customSkin" type="default" uniquename="customSkin">...setting the correct context-root, resourceroot, and uniquename for your skin.
- Find the <theme> tag for the Portal 8.0 theme, it is likely the first <theme> tag in the file. Find and copy one of the <allowed-skin> tag lines, such as:
<allowed-skin skin="ZK_CGAH47L00GJJ40IDC03MS13OS2" update="set"/>Find the <theme> tag for the customTheme theme, it is likely the last <theme> tag in the file. Paste the <allowed-skin> tag line in just above the <parameter> tags. Modify the skin parameter value identifier to be the identifier of the customSkin skin, which can be found in the objectid parameter of the <skin> tag of the customSkin skin, likely the last <skin> tag in the file, such as:
<allowed-skin skin="ZK_N0IEGGC0I08PF0IDQ60O6310N4" update="set"/>
- Update the skin and theme definitions...
xmlaccess -user wpadmin -password foo -url hostname:10039/wps/config -in output.xml -out output2.xml
- Edit the output2.xml file to verify the result is ok, and then delete the input.xml, output.xml, and output2.xml files.
Parent: Link the static resources to the dynamic resources for the theme