[jboss-user] [JBoss Portal] - Re: How to put two portlets horizontally(single row) in regi
rharari
do-not-reply at jboss.com
Wed May 30 01:37:07 EDT 2007
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
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049587#4049587
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049587
More information about the jboss-user
mailing list