This content has been marked as final.
Show 1 reply
-
1. Re: How to put two portlets horizontally(single row) in regi
rharari May 30, 2007 1:37 AM (in response to ritesh_sanjay)Hi Ritesh,
If I get your question, you are trying to configure something like this:+-----------------------+ | Portlet 1 | +-----------------------+ | Portlet 2 | Portlet 3 | +-----------------------+
Is that right?
So you have to create your own layout.
As a start point, consider analyzing the index.jsp under portal-core.war\layouts\3columns<div id="content-container"> <table> <tr> <td valign="top"> <p:region regionName='left' regionID='left'/> </td> <td valign="top"> <p:region regionName='center' regionID='center'/> </td> <td valign="top"> <p:region regionName='right' regionID='right'/> </td> <hr class="cleaner"/> </div>
The easy way is to duplicate all of this files (index and maximized) into another directory like: portal-core.war\layouts\myLayout
Then change the index.jsp to achieve your needs:<div id="content-container"> <table> <tr> <td valign="top" colspan="2"> <p:region regionName='center' regionID='center'/> </td> </tr> <tr> <td valign="top"> <p:region regionName='left' regionID='left'/> </td> <td valign="top"> <p:region regionName='right' regionID='right'/> </td> </tr> <hr class="cleaner"/> </div>
Almost finished.
Now edit this file \jboss-portal.sar\portal-core.war\WEB-INF\portal-layouts.xml and add a declaration for your new layout:.... <layout> <name>myLayout</name> <uri>/layouts/myLayout/index.jsp</uri> <uri state="maximized">/layouts/myLayout/maximized.jsp</uri> <regions> <region name="left"/> <region name="center"/> <region name="right"/> <region name="navigation"/> </regions> </layout> ....
Restart jboss and then you can use your new layout with your pages (it will be available in the Layout combobox at admin/management portlet -> theme )
regards,
R.Harari