2 Replies Latest reply on May 26, 2006 4:41 AM by salva vilarrasa

    3 column layout

    salva vilarrasa Newbie

      I have changed the industrial theme to have a 3 column layout, but i am not able to see the portlets displayed in the right side.
      Here is a portion of a page code in *-object.xml descriptor:


      <window-name>UserPortletWindow</window-name>
      <instance-ref>UserPortletInstance</instance-ref>
      left
      0


      <window-name>conrakPortletWindow</window-name>
      <instance-ref>cubePortletInstance</instance-ref>
      center
      0


      <window-name>TapestryHelloWorldWindow</window-name>
      <instance-ref>TapestryHelloWorldInstance</instance-ref>
      right
      0



      Obviously the portal-style.css has been modified to enable the third column. Any suggestions?? thanks.

        • 1. Re: 3 column layout
          Colin Toal Newbie

          It isn't enough to change the 'theme' stylesheet to show the third column ('region' in JB Portal terminology) You need to also alter the layout being used to include that region.

          To alter the generic layout:

          Change the /core/src/bin/portal-core-war/layouts/generic/index.jsp to include a <p:region> tag with a regionName attribute of 'right' and regionID attribute of 'RegionC'.

          The regionName attribute will let the Page rendering find it (it will map to the management portal portlet section). The regionID attribute will be used by the CSS theme.

          The tag will look like this:

          <!-- 'left' region of the page, selector id 'regionA' -->
          <p:region regionName='left' regionID='regionA'/>
          <!-- 'center' region of the page, selector id 'regionB' -->
          <p:region regionName='center' regionID='regionB'/>
          <!-- NEW 'right' region, CSS selector Id 'regionC' -->
          <p:region regionName='right' regionID='regionC'/>
          <hr class="cleaner"/>


          It is actually preferable that you make a copy of this file and change it, and then package it together with your descriptors and CSS as your whole theme and layout- but that involves creating more descriptors.

          Next - make sure your portal-layouts.xml layout description for your theme includes a tag with a child tag for each of the regions on your index.jsp.

          Like this:

           <layout>
           <name>yourtheme</name>
           <uri>/themes/yourtheme/index.jsp</uri>
           <regions>
           <region name="left"/>
           <region name="center"/>
           <region name="right"/>
           <region name="navigation"/>
           </regions>
           </layout>
          


          This should be enough to alter the generic layout to use a three column format provided you have removed the 'display:none' CSS attribute from the theme CSS.

          If you are a coding type, you can put a break point in the page rendering code to see how these tags are used.



          • 2. Re: 3 column layout
            salva vilarrasa Newbie

            Thank you it was very helpful!! now I can place portlets in the third one!
            cheers again.