portals-jetspeed-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cubehead Fang <cubeh...@gmail.com>
Subject Re: Layout portlet: cannot define the column width
Date Tue, 03 Jan 2006 01:13:02 GMT
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/2, Cubehead Fang <cubehead@gmail.com>:

> if you don't like to change the code, you can change the portlet.xml of
> the layout portlet.
> Change the value of ViewPages from "columns" to "tcolumns" for your layout
> portlet. It works well.
>
>
> 2006/1/2, Jouni Rajala <jouni.rajala@systeemiratkaisu.fi>:
> >
> > Cubehead Fang wrote:
> >
> > >hi all,
> > >
> > >When i use the VelocityTwoColumnsSmallLeft or VelocityTwoColumns2575
> > >portlet,  it isn't different from VelocityTwoColumns portlet.
> > >It didn't define the width of the column. But when using
> > >VelocityTwoColumnsTable, it works well. I found that the column
> > >template have not define the width of the column in that file,
> > >WEB-INF/templates/layout/html/columns/layout.vm.
> > >
> > >
> > >
> > I have noticed that columns widths in all layouts seem to be even (50/50
> > or 33/33/33). I have
> > tried to get smaller left column without success. I was just about to
> > post about the problem
> > here and ask am I only one with this problem. Seems that I am not the
> > only one.
> >
> > --
> > Jouni Rajala
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> > For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message