Tuesday, 5 June 2012

Global Module Creation inWebspshere Portal Server 8.0

Through this, Module is shared across all themes.




In plugin.xml
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin id="com.ibm.myprofile" name="My_Profile" provider-name="IBM" version="1.0.0">
<extension point="com.ibm.portal.resourceaggregator.module" id="wp_portal" >

    <module id="mymodule" version="1.0" >

    <prereq id="wp_portal" />

    <capability id="capabilityA" value="1.0.0"/>

    <contribution type="head">

       <sub-contribution type="js">

            <uri value="res:/MyProfile/js/myprofile_head.js" />

       </sub-contribution>

   </contribution>

</module>

</extension>

</plugin>


  1. Deploy the MyProfile .war into Websphere portal application server with context root /MyProfile
  2. I created myprofile.json  and upload /fs-type1/themes/MyTheme/profiles/ folder in WebDAV
{
                "moduleIDs": [
                                "wp_theme_portal_80",
                                "wp_portlet_css",
                                "wp_one_ui",
                                "wp_one_ui_dijit",
                                "wp_legacy_layouts",
                                "wp_client_ext",
                                "wp_status_bar",
                                "wp_theme_menus",
                                "wp_theme_skin_region",
                                "wp_theme_high_contrast",
                                "wp_layout_windowstates",
                                "wp_project_menu",
                                "wp_portal",
                                "dojo_dom",
                                "dijit_app",
                                "dijit_form",
                                "dijit_layout_basic",
                                "dijit_layout_ext",
                                "wp_wcm_modal_dialog",
                                "mymodule"
                ]
}


 
3. Restart websphere portal server
4. Set page parameter as resourceaggregation.profile=profile/myprofile.json in your page.


No comments:

Post a Comment