Modify the dynamic resource references for the theme
We must modify the dynamic resource references to link to the static resources for the theme. Dynamic content spots are defined through a module called wp_dynamicContentSpots_85. The module is defined in the plugin.xml file, which was copied when we copied your theme.
- Open the plugin.xml from the CustomTheme project that you created when we completed the steps in Copying the dynamic resources for the theme.
- Edit the IDs and names to have a unique custom name. Use custom plug-in IDs with the prefix of your company name to ensure that your .WAR files are invalidated. See Configuration for resource aggregation for more information about creating custom plug-in IDs. For example,
<?xml version="1.0" encoding="UTF-8"?> <plugin name="Custom Theme Modules" provider-name="Your Company" version="1.0.0"> <extension point="com.ibm.portal.resourceaggregator.module"> <module > <contribution type="dyn-cs"> <sub-contribution type="markup" ref-> <uri value="res:{war:context-root}/themes/html/dynamicSpots/footer.jsp"/> </sub-contribution> <sub-contribution type="markup" ref-> <uri value="mvc:res:{war:context-root}/themes/html/dynamicSpots/crumbTrail.jsp,smartphone@"/> </sub-contribution> <sub-contribution type="markup" ref-> <uri value="mvc:smartphone/tablet@res:{war:context-root}/themes/html/dynamicSpots/navigation.jsp?type=top"/>" </sub-contribution> <sub-contribution type="markup" ref-> <uri value="mvc:res:{war:context-root}/themes/html/dynamicSpots/navigation.jsp?type=primary,smartphone@,tablet@"/> </sub-contribution> <sub-contribution type="markup" ref-> <uri value="mvc:res:{war:context-root}/themes/html/dynamicSpots/navigation.jsp?type=secondary,smartphone@,tablet@"/> </sub-contribution> <sub-contribution type="markup" ref-> <uri value="mvc:res:{war:context-root}/themes/html/dynamicSpots/sideNavigation.jsp?startLevel=2,smartphone@,tablet@"/> </sub-contribution> <sub-contribution type="markup" ref-> <uri value="mvc:smartphone/tablet@res:{war:context-root}/themes/html/dynamicSpots/mobileNavigation.jsp"/> </sub-contribution> <sub-contribution type="markup" ref-> <uri value="res:{war:context-root}/themes/html/dynamicSpots/commonActions.jsp"/> </sub-contribution> <sub-contribution type="markup" ref-> <uri value="lm:template"/> </sub-contribution> <sub-contribution type="markup" ref-> <uri value="mc:wp_toolbar85@mvc:dyn-cs%3Aid%3A85toolbar%2Csmartphone%40%2Ctablet%40"/> </sub-contribution> <sub-contribution type="markup" ref-> <uri value="res:{war:context-root}/themes/html/dynamicSpots/head.jsp"/> </sub-contribution> <sub-contribution type="markup" ref-> <uri value="mc:wp_status_bar@res:{war:context-root}/themes/html/dynamicSpots/status.jsp"/> </sub-contribution> </contribution> </module> </extension>- On your local disk, access the customTheme directory that you created when we completed the steps in Copy the static resources for your theme.
- Modify the profiles for your custom theme to include the module in your plugin.xml.
- From the customTheme/profiles folder, edit each profile file.
- Replace the wp_dynamicContentSpots_85 module with the wp_dynamicContentSpots_custom module that you created when you modified the plugin.xml.
- Save changes.
- From the customTheme/nls folder, edit the theme_en.html file (or whichever file is the default locale) on your local drive. Repeat for any of the other locale files for languages that you support.
- In the theme_lang.html files, find and replace all occurrences of 85theme with customtheme. For example, dyn-cs:id:85theme_head becomes dyn-cs:id:customtheme_head.
- Save your files.
What to do next
Note: We do not need to modify the theme.html file in the customTheme folder. That file is not used other than to redirect to the appropriate locale file in the nls folder. You need to modify it only if you add or remove locales.
Parent topic: Create a WebDAV-based theme copy
References: