Define the module
Many of the modules listed in the profile are modules provided by IBM WebSphere Portal and defined in various plugin.xml files. Any modules that you creato that are specific to the theme need to be defined in the plugin.xml file for the theme.
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. This file can be used as a reference point in creating our own plugin.xml file.
- Create a plugin.xml file in the web app WEB-INF folder for the theme at WP_PROFILE\installedApps\MyNode\MyTheme.ear\MyTheme.war\WEB-INF.
- Edit the plugin.xml file and paste in the following starting xml, specifying our own plug-in id, name, and provider-name.
<?xml version="1.0" encoding="UTF-8"?> <?eclipse version="3.0"?> <plugin id="com.myco.themes.YourTheme" name="Your_Theme_plugins" version="1.0.0" provider-name="YourCo"> </plugin>
- Between the <plugin></plugin> tags, create an extension point (module definition) with the unique module ID for the head contribution of the theme module. Link the common.css, master.css, and any other .css files specific to the theme here:
<extension point="com.ibm.portal.resourceaggregator.module" id="theme_css_config"> <module id="theme_YourTheme"> <prereq id="wp_one_ui"/> <prereq id="wp_portlet_css"/> <prereq id="mm_builder"/> <prereq id="dojo"/> <prereq id="wp_pagebuilder_widget_css"/> <prereq id="wp_tagging_rating"/> <prereq id="wp_pagebuilder_base"/> <prereq id="wp_pagebuilder_dnd"/> <prereq id="wp_pagebuilder_data"/> <prereq id="wp_client_main"/> <prereq id="wp_portal_client_utils"/> <prereq id="wp_pagebuilder_shelf"/> <prereq id="mm_enabler"/> <prereq id="wp_portlet_client_model"/> <prereq id="wp_portal_client_rest_utils"/> <prereq id="wp_search"/> <prereq id="wp_analytics"/> <contribution type="head" > <sub-contribution type="css"> <uri value="dav:fs-type1/common-resources/ibm/css/common.css" /> <uri type="rtl" value="dav:fs-type1/common-resources/ibm/css/commonRTL.css" /> </sub-contribution> <sub-contribution type="css"> <uri value="dav:fs-type1/themes/yourTheme/css/master.css" /> <uri type="rtl" value="dav:fs-type1/themes/yourTheme/css/masterRTL.css" /> </sub-contribution> </contribution> <contribution type="config"> <sub-contribution type="js"> <uri value="dav:fs-type1/themes/yourTheme/js/init.js" /> </sub-contribution> </contribution> </module> </extension>
- Connect the WebDAV client to http://localhost:10039/wps/mycontenthandler/dav/fs-type1/.
- From the profiles folder within the folder for the theme, copy the profile_full.json file to the local drive.
- Modify the local copy of the file and make the following module ID changes to the profile:
- Change the wp_theme_portal_80 entry to the module ID for the theme, theme_YourTheme:
"theme_YourTheme",
- Add the following entries after the module ID for your theme:
"wp_pagebuilder_widget_css", "mm_controlled_nav_widget", "mm_content_set_list", "mm_content_set_menu", "wp_search",
- Delete this entry:
"wp_legacy_layouts",
- Copy the local copy of the profile_full.json file into the profiles folder in the folder for the theme in the fs-type1 folder.
- From the themes\Portal8.0\menuDefinitions folder, copy the shelfActions.json file to a local drive.
- Copy the local copy of the file into the themes\customTheme\menuDefinitions folder for the theme in the fs-type1 folder.
- From the themes\Portal8.0\contributions folder, copy the oneui30.json file to a local drive.
- Copy the local copy of the file into the themes\customTheme\contributions folder for the theme in the fs-type1 folder.
- From the PORTAL_HOME\theme\wp.theme.dojo\installedApps\dojo.ear\dojo.war\v1.6 folder, copy the dojo16.json file into the themes\customTheme\contributions folder for the theme in the fs-type1 folder. Do not use the dojo17.json file, as Dojo 1.7 is not supported with a Page Builder-based theme. Dojo 1.6 is the highest supported Dojo version for use with a Page Builder-based theme.
Parent: Making a modularized theme