You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Elif Guner <el...@gmail.com> on 2006/09/12 22:43:50 UTC
How to write a custom layout?
Can anyone help me about defining a custom layout like
Velocity:TwoColumns. It has three columns and I want to define four
columns.
Also I need urgent help with nested layouts. When I try the nested
layout example on apache website, I get the header again in my second
layout fragment. Why is this happening and how can I fix it?
Thanks....
elif
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
Re: How to write a custom layout?
Posted by David Sean Taylor <da...@bluesunrise.com>.
Elif Guner wrote:
> Hi David,
> Thanks for your quick response. One more thing I'd like to ask is that
> where can I find that portlet.xml if I want to edit it myself? I built
> a custom portal using maven plugin.
> Thanks again...
> Elif
Under the source tree, look under layout-portlets/src/webapp/WEB-INF/
In a deployed Jetspeed, it is deployed as a local portlet application
under /jetspeed/WEB-INF/apps/jetspeed-layouts/WEB-INF/
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
Re: How to write a custom layout?
Posted by Elif Guner <el...@gmail.com>.
Hi David,
Thanks for your quick response. One more thing I'd like to ask is that
where can I find that portlet.xml if I want to edit it myself? I built
a custom portal using maven plugin.
Thanks again...
Elif
On 9/13/06, David Sean Taylor <da...@bluesunrise.com> wrote:
> Elif Guner wrote:
> > Can anyone help me about defining a custom layout like
> > Velocity:TwoColumns. It has three columns and I want to define four
> > columns.
>
> http://portals.apache.org/jetspeed-2/guides/guide-layouts.html
>
> Layouts are implemented as portlets.
> There is currently one portlet application for all layouts.
> I think we need to improve on this solution, because everytime we need a
> new column layout, we need to define a new portlet. I checked in a
> change to the portlet.xml for the layout portlets. Here it is;
>
> <portlet id="VelocityFourColumns">
> <portlet-name>VelocityFourColumns</portlet-name>
> <display-name>Four Layout Using Velocity</display-name>
> <init-param>
> <name>ViewPage</name>
> <value>columns</value>
> </init-param>
> <init-param>
> <name>MaxPage</name>
> <value>maximized</value>
> </init-param>
> <init-param>
> <name>columns</name>
> <value>4</value>
> </init-param>
> <init-param>
> <name>sizes</name>
> <value>20%,30%,30%,20%</value>
> </init-param>
> <init-param>
> <name>layoutType</name>
> <value>FourColumns</value>
> </init-param>
>
> <portlet-class>org.apache.jetspeed.portlets.layout.MultiColumnPortlet</portlet-class>
>
> <resource-bundle>org.apache.jetspeed.portlets.layout.resources.LayoutResource</resource-bundle>
> <expiration-cache>-1</expiration-cache>
> <supports>
> <mime-type>text/html</mime-type>
> <portlet-mode>view</portlet-mode>
> <portlet-mode>edit</portlet-mode>
> <portlet-mode>help</portlet-mode>
> </supports>
> <portlet-info>
> <title>VelocityFourColumns</title>
> <short-title>FourColumns</short-title>
> </portlet-info>
> </portlet>
>
>
>
> Here is a sample psml file using the four column layout:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <page id="/Test.psml" hidden="false">
> <title>Test</title>
> <short-title>Test</short-title>
> <defaults layout-decorator="tigris" portlet-decorator="tigris"/>
> <fragment id="P-10da7f576ef-10001" type="layout"
> name="jetspeed-layouts::VelocityFourColumns">
> <fragment id="P-10da7f62ec0-10002" type="portlet"
> name="demo::BookmarkPortlet">
> <property name="row" value="0"/>
> <property name="column" value="0"/>
> </fragment>
> <fragment id="P-10da7f62ec0-10003" type="portlet"
> name="demo::CustomerDetail">
> <property name="row" value="1"/>
> <property name="column" value="2"/>
> </fragment>
> <fragment id="P-10da7f62ede-10004" type="portlet"
> name="demo::CustomerInfo">
> <property name="row" value="1"/>
> <property name="column" value="3"/>
> </fragment>
> <fragment id="P-10da7f62ede-10005" type="portlet"
> name="demo::CustomerList">
> <property name="row" value="0"/>
> <property name="column" value="1"/>
> </fragment>
> </fragment>
> </page>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
Re: How to write a custom layout?
Posted by David Sean Taylor <da...@bluesunrise.com>.
Elif Guner wrote:
> Can anyone help me about defining a custom layout like
> Velocity:TwoColumns. It has three columns and I want to define four
> columns.
http://portals.apache.org/jetspeed-2/guides/guide-layouts.html
Layouts are implemented as portlets.
There is currently one portlet application for all layouts.
I think we need to improve on this solution, because everytime we need a
new column layout, we need to define a new portlet. I checked in a
change to the portlet.xml for the layout portlets. Here it is;
<portlet id="VelocityFourColumns">
<portlet-name>VelocityFourColumns</portlet-name>
<display-name>Four Layout Using Velocity</display-name>
<init-param>
<name>ViewPage</name>
<value>columns</value>
</init-param>
<init-param>
<name>MaxPage</name>
<value>maximized</value>
</init-param>
<init-param>
<name>columns</name>
<value>4</value>
</init-param>
<init-param>
<name>sizes</name>
<value>20%,30%,30%,20%</value>
</init-param>
<init-param>
<name>layoutType</name>
<value>FourColumns</value>
</init-param>
<portlet-class>org.apache.jetspeed.portlets.layout.MultiColumnPortlet</portlet-class>
<resource-bundle>org.apache.jetspeed.portlets.layout.resources.LayoutResource</resource-bundle>
<expiration-cache>-1</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode>
<portlet-mode>edit</portlet-mode>
<portlet-mode>help</portlet-mode>
</supports>
<portlet-info>
<title>VelocityFourColumns</title>
<short-title>FourColumns</short-title>
</portlet-info>
</portlet>
Here is a sample psml file using the four column layout:
<?xml version="1.0" encoding="UTF-8"?>
<page id="/Test.psml" hidden="false">
<title>Test</title>
<short-title>Test</short-title>
<defaults layout-decorator="tigris" portlet-decorator="tigris"/>
<fragment id="P-10da7f576ef-10001" type="layout"
name="jetspeed-layouts::VelocityFourColumns">
<fragment id="P-10da7f62ec0-10002" type="portlet"
name="demo::BookmarkPortlet">
<property name="row" value="0"/>
<property name="column" value="0"/>
</fragment>
<fragment id="P-10da7f62ec0-10003" type="portlet"
name="demo::CustomerDetail">
<property name="row" value="1"/>
<property name="column" value="2"/>
</fragment>
<fragment id="P-10da7f62ede-10004" type="portlet"
name="demo::CustomerInfo">
<property name="row" value="1"/>
<property name="column" value="3"/>
</fragment>
<fragment id="P-10da7f62ede-10005" type="portlet"
name="demo::CustomerList">
<property name="row" value="0"/>
<property name="column" value="1"/>
</fragment>
</fragment>
</page>
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org