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 Clarence Ho <cl...@mdcl.com.hk> on 2006/01/03 11:14:20 UTC

Change a page's layout

Hi,

I created some new pages in the portal and want to try out different layout formats (e.g. three columns, two columns small left, etc.).

I tried to modify the layout by both editing the .psml file and through the edit mode of the page.

However, no matter which layout I set, it's still using the default two columns (50%, 50%) layout. It seems that the portlet config cannot be properly retrieve, so the layout portlet always use the default value.

Kindly advice on where I should check in order to fix the problem.

Thanks a lot
Clarence


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Change a page's layout

Posted by Cubehead Fang <cu...@gmail.com>.
if you edit your psml file in the editor, please change the fragment's id.

if you change the portlet.xml , please restart your tomcat.


2006/1/3, Clarence Ho <cl...@mdcl.com.hk>:
>
> Dear Cubehead,
>
> Actually I've tried both ways but still can't fix the problem.
>
> I modified the layout.vm to display the no. of columns in the page, and it
> always display 2, even though I have changed the layout to
> "jetspeed-layouts::VelocityOneColumn"
>
> I believe that it somehow fail to retrieve the portlet config.
>
> Clarence
>
>
> -----Original Message-----
> From: Cubehead Fang [mailto:cubehead@gmail.com]
> Sent: Tuesday, January 03, 2006 6:24 PM
> To: Jetspeed Users List
> Subject: Re: Change a page's layout
>
>
> hi.
> you have 2 ways to fix the problem.
>
> 1. change the portlet.xml of the layout portlet application
> change value of the init-param ViewPage of the you want to use portlet
> from
> "columns" to "tcolumns".
>
> 2. change the layout.vm.
> there is a solution.
>
> change the follow lines in the
> WEF-INF/templates/layout/html/columns/layout.vm
> -----------------------------------
>   #*
>   #if ($columnLayout.getColumnWidth($sizeIndex) > 0)
>     #set($columnWidth = $columnLayout.getColumnWidth($sizeIndex))
>   #end
>   *#
>
>   #set ($sizeIndex = $sizeIndex + 1)
>   <div id="column-$sizeIndex" class="portal-layout-column" >
> ------------------------------
> into
> -----------------------------
>
>   #if ($sizes.size() > $sizeIndex)
>     #set($columnWidth = $sizes.get($sizeIndex))
>   #end
>
>   #set ($sizeIndex = $sizeIndex + 1)
>   <div id="column-$sizeIndex" class="portal-layout-column"
> style="width:$columnWidth;padding-left:0px;">
> -----------------------------
>
> And modify the css class , "portal-layout-cell" , in the style.css file of
> your decorator.
> add the padding-left and padding-right to the class.
>
> there is a sample:
> .portal-layout-cell
> {
> padding-bottom: 4px;
> padding-left: 5px;
> padding-right: 5px;
> }
>
> then the layout portlet will work well.
>
>
>
> 2006/1/3, Clarence Ho <cl...@mdcl.com.hk>:
> >
> > Hi,
> >
> > I created some new pages in the portal and want to try out different
> > layout formats (e.g. three columns, two columns small left, etc.).
> >
> > I tried to modify the layout by both editing the .psml file and through
> > the edit mode of the page.
> >
> > However, no matter which layout I set, it's still using the default two
> > columns (50%, 50%) layout. It seems that the portlet config cannot be
> > properly retrieve, so the layout portlet always use the default value.
> >
> > Kindly advice on where I should check in order to fix the problem.
> >
> > Thanks a lot
> > Clarence
> >
> >
> > ---------------------------------------------------------------------
> > 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: Change a page's layout

Posted by Clarence Ho <cl...@mdcl.com.hk>.
Dear Cubehead,

Actually I've tried both ways but still can't fix the problem.

I modified the layout.vm to display the no. of columns in the page, and it always display 2, even though I have changed the layout to "jetspeed-layouts::VelocityOneColumn"

I believe that it somehow fail to retrieve the portlet config.

Clarence


-----Original Message-----
From: Cubehead Fang [mailto:cubehead@gmail.com]
Sent: Tuesday, January 03, 2006 6:24 PM
To: Jetspeed Users List
Subject: Re: Change a page's layout


hi.
you have 2 ways to fix the problem.

1. change the portlet.xml of the layout portlet application
change value of the init-param ViewPage of the you want to use portlet from
"columns" to "tcolumns".

2. change the layout.vm.
 there is a solution.

change the follow lines in the
WEF-INF/templates/layout/html/columns/layout.vm
-----------------------------------
   #*
   #if ($columnLayout.getColumnWidth($sizeIndex) > 0)
     #set($columnWidth = $columnLayout.getColumnWidth($sizeIndex))
   #end
   *#

   #set ($sizeIndex = $sizeIndex + 1)
   <div id="column-$sizeIndex" class="portal-layout-column" >
------------------------------
into
-----------------------------

   #if ($sizes.size() > $sizeIndex)
     #set($columnWidth = $sizes.get($sizeIndex))
   #end

   #set ($sizeIndex = $sizeIndex + 1)
   <div id="column-$sizeIndex" class="portal-layout-column"
style="width:$columnWidth;padding-left:0px;">
-----------------------------

And modify the css class , "portal-layout-cell" , in the style.css file of
your decorator.
add the padding-left and padding-right to the class.

there is a sample:
.portal-layout-cell
{
  padding-bottom: 4px;
  padding-left: 5px;
  padding-right: 5px;
}

then the layout portlet will work well.



2006/1/3, Clarence Ho <cl...@mdcl.com.hk>:
>
> Hi,
>
> I created some new pages in the portal and want to try out different
> layout formats (e.g. three columns, two columns small left, etc.).
>
> I tried to modify the layout by both editing the .psml file and through
> the edit mode of the page.
>
> However, no matter which layout I set, it's still using the default two
> columns (50%, 50%) layout. It seems that the portlet config cannot be
> properly retrieve, so the layout portlet always use the default value.
>
> Kindly advice on where I should check in order to fix the problem.
>
> Thanks a lot
> Clarence
>
>
> ---------------------------------------------------------------------
> 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: Change a page's layout

Posted by Cubehead Fang <cu...@gmail.com>.
hi.
you have 2 ways to fix the problem.

1. change the portlet.xml of the layout portlet application
change value of the init-param ViewPage of the you want to use portlet from
"columns" to "tcolumns".

2. change the layout.vm.
 there is a solution.

change the follow lines in the
WEF-INF/templates/layout/html/columns/layout.vm
-----------------------------------
   #*
   #if ($columnLayout.getColumnWidth($sizeIndex) > 0)
     #set($columnWidth = $columnLayout.getColumnWidth($sizeIndex))
   #end
   *#

   #set ($sizeIndex = $sizeIndex + 1)
   <div id="column-$sizeIndex" class="portal-layout-column" >
------------------------------
into
-----------------------------

   #if ($sizes.size() > $sizeIndex)
     #set($columnWidth = $sizes.get($sizeIndex))
   #end

   #set ($sizeIndex = $sizeIndex + 1)
   <div id="column-$sizeIndex" class="portal-layout-column"
style="width:$columnWidth;padding-left:0px;">
-----------------------------

And modify the css class , "portal-layout-cell" , in the style.css file of
your decorator.
add the padding-left and padding-right to the class.

there is a sample:
.portal-layout-cell
{
  padding-bottom: 4px;
  padding-left: 5px;
  padding-right: 5px;
}

then the layout portlet will work well.



2006/1/3, Clarence Ho <cl...@mdcl.com.hk>:
>
> Hi,
>
> I created some new pages in the portal and want to try out different
> layout formats (e.g. three columns, two columns small left, etc.).
>
> I tried to modify the layout by both editing the .psml file and through
> the edit mode of the page.
>
> However, no matter which layout I set, it's still using the default two
> columns (50%, 50%) layout. It seems that the portlet config cannot be
> properly retrieve, so the layout portlet always use the default value.
>
> Kindly advice on where I should check in order to fix the problem.
>
> Thanks a lot
> Clarence
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>