+

Search Tips   |   Advanced Search

Create a module for each skin in the theme


The skins provided with the PageBuilder2 theme contained JavaScript code and static templates, which defined the markup for each skin.

The static template is started automatically by the information defined in the skin resource when it is created using XmlAccess. However, for the JavaScript code to be available at run time on the portal page within a modularized theme, a module must be created for each skin used.

The plugin.xml file in the PORTAL_HOME\theme\wp.theme.modules\webapp\installedApps\ThemeModules.ear\ThemeModules.war\WEB-INF\lib\pagebuilder.jar file is an example of one of the plugin.xml files provided by IBM WebSphere Portal. This file can be used as a reference point in creating our own plugin.xml file if you want.

In this section, replace all items indicated by italics with the actual names of the items. Complete the following steps for each custom skin that we use in the theme:

  1. Edit the plugin.xml file for your theme in the WP_PROFILE\installedApps\MyNode\MyTheme.ear\MyTheme.war\WEB-INF folder. Create modules between the <plugin></plugin> tags with unique module ID and a JavaScript subcontribution for the JavaScript code for the skin, such as:
    <extension point="com.ibm.portal.resourceaggregator.module" id="yourtheme_yourskin_config">
     <module id="yourtheme_yourskin">
      <prereq id="wp_pagebuilder_base"/>
      <contribution type="config">
       <sub-contribution type="js">
        <uri value="dav:fs-type1/skins/YourSkin/skin.js"/>
       </sub-contribution>
      </contribution>
     </module> </extension>
    

  2. Connect the WebDAV client to http://localhost:10039/wps/mycontenthandler/dav/fs-type1/.

  3. From the profiles folder within the folder for the theme, copy the profile_full.json file to the local drive.

  4. Modify the local copy of the file to add the unique module ID for the skin to the profile at the end of the moduleIDs list, such as:
    ,   "yourtheme_yourskin"
    

  5. Copy the local copy of the profile_full.json file back into the profiles folder in the folder for the theme in fs-type1.


Parent: Update a Page Builder theme to use Dojo 1.6