Adding support for JQuery as module in modular theme

I wanted to try adding a custom module in the Modular theme so i started reading the Using jQuery in a theme wiki page and i made few changes in the steps to get it working in my local. It seems that the source code for all the modules that are part of Portal 7002 modular theme is stored in the .war file in WebSphere\PortalServer\theme\wp.theme.modules\webapp\installedApps\ThemeModules.ear\ThemeModules.war\modules
Now we are not supposed to add any code in the WebSphere\PortalServer directory because when you install new fix or fix pack your changes could get overwritten, so i did create a new HelloModular.war file that has all the static resources as well as plugin.xml file that defines the static resources in my theme. You can download the HelloModular.war file with all the source code from here, i followed these steps
  1. First i did create HelloModular as Dynamic Web Application(basically a .war file) in RAD
  2. Then i did copy the jquery.min.js(I got the latest version from JQuery Web Site), jSquishy.css,jSquishy.js,jSquishy.jsp(I got the jSquishy related files from Portal Wiki) in the WebContent folder so that they will be available at the root of the HelloModular web application. This is how my project structure looks like
  3. After that i had to create plugin.xml that defines the jQuery and jSquishy related modules like this
    <?xml version="1.0" encoding="UTF-8"?>
    <?eclipse version="3.0"?>
       name="jQuery module contributions"
            <!-- jQuery js -->
     <extension point="" 
      <module id="jQuery">
       <prereq id="wp_portal"/>
       <contribution type="head">
        <sub-contribution type="js">
      <uri value="res:/HelloModular/jquery.min.js" />
     <extension point="" 
      <module id="jSquishy">
       <prereq id="jQuery"/>
       <contribution type="head">
        <sub-contribution type="css">
      <uri value="res:/HelloModular/jSquishy.css" />
        <sub-contribution type="js">
      <uri value="res:/HelloModular/jSquishy.js" />
       <contribution type="config">
        <sub-contribution type="markup">
      <uri value="res:/HelloModular/jSquishy.jsp"/>
    The jquery.min.js is available at http://localhost:10039/HelloModular/jquery.min.js so i had to define it like res:/HelloModular/jquery.min.js while declaring it as a module.
  4. The last step was to create a profile_jquery.json like this
     "moduleIDs" : [
    After creating this profile_jquery.json i did upload it to /fs-type1/themes/Portal7.0.0.2/profiles/ folder in WebDAV
  5. Last step was to restart the changes for new module definition to get applied
  6. I did change the profile applied to one of my test page to profile_jquery.json by following steps defined in Changing the profile for a page
Now this is how my portal page looks like with squishy in both header and footer
When i looked at the request flow in the Firebug i can see the jQuery related resources being included. Follow the steps in Disabling combining of resource for debugging modular theme so that you can see individual request for resource.


Joyce James said...

Great post. Finding ideas to write about is one of the hardest things about running a blog. Please visit

Jason Borne said...

Nice post and great content.
Avast Customer Support is here to help you out with the whole procedure to Download Avast Antivirus online, We not only fix your Avast Support related issues but will guide with how to get started with your new Avast product once it gets installed successfully. We at Avast Tech Support provides service to protect your PC from potential online threats and external attacks like viruses, Trojans, malwares, spywares and phishing scams. And Avast Refund. Call on our Avast Phone Number

Gmail Customer service is a third party technical support service for Gmail users when they face any technical issue or error in their Gmail account. Our Gmail Customer Support team solves issues like forgot Gmail account password, Gmail configuration or Sync issues, recover deleted emails and many more. Toll Free number (800) 986-9271

How you install or reinstall Office 365 or Office 2016 depends on whether your Office product is part of an Office for home or Office for business plan. If you're not sure what you have, see what office com setup products are included in each plan and then follow the steps for your product. The steps below also apply if you're installing a single, stand-alone Office application such as Access 2016 or Visio 2016. Need Help with office setup Enter Product Key? Call 1-800-000-0000 Toll Free
Norton Tech Support is a third party service provider and not in any way associated with Norton or any of its partner companies. We offer support for Norton products and sell subscription based additional warranty on computer and other peripheral devices. Call our Toll Free number 1 855 966 3855
Other Services
Norton Toll Free , Office-Setup ,

Alwin Co Daan said...

Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Front end developer learn from JQuery Training in Chennai . or learn thru JQuery Training . or learn thru ES6 Online Training. Nowadays JavaScript has tons of job opportunities on various vertical industry.

srjwebsolutions said...

We are leading responsive website designing and development company in Noida.
We are offering mobile friendly responsive website designing, website development, e-commerce website, seo service and sem services in Noida.

Responsive Website Designing Company in Noida
Website Designing Company in Noida
SEO Services in Noida
SMO Services in Noida

EG MEDI said... is online medical store pharmacy in laxmi nagar Delhi. You can Order prescription/OTC medicines online. Cash on Delivery available. Free Home Delivery

Online Pharmacy in Delhi
Buy Online medicine in Delhi
Online Pharmacy in laxmi nagar
Buy Online medicine in laxmi nagar
Onine Medical Store in Delhi
Online Medical store in laxmi nagar
Online medicine store in delhi
online medicine store in laxmi nagar
Purchase Medicine Online
Online Pharmacy India
Online Medical Store

Vikas Chaudhary said...

Battery Mantra is Authorized exide car battery dealer in Noida and Greater Noida. We are providing our service in Indirapuram, Delhi, Ashok Nagar.

Exide Battery Dealer in Noida
Battery Dealer in Noida
Authorized Battery Dealer in Noida
Car Battery Dealer in Noida
Car Battery Dealer
Exide Battery Dealer