I just managed to do what I needed to do! I played with layout.vm file
and what I basically did was, if the fragment id = the big portlet's
id, then open a div tag and put the upcoming portlets within that div
and check the last portlet's id (that's supposed to be in the div) and
then if it's the last fragment close the div. The piece of code
opening up the div and closing it is:
<div id="column_${myFragment.getId()}_${columnIndex}"
class="portal-layout-column
portal-layout-column-${layoutType}-${columnIndex}"
style="float:${columnFloat}; width:${columnWidth};">
#foreach($f in $column)
## Set up coordinates for this fragment
#set($coords = $columnLayout.getCoordinate($f))
#set($col = $coords.x)
#set($lastRow = $columnLayout.getLastRowNumber($col))
#set($row = $coords.y)
## if two portlets need to be enclosed within a div
#if($putinonediv == "true")
<div id="portletencloser" style="float:left";>
<div class="portal-layout-cell
portal-layout-cell-${layoutType}-${row}-${col}" style="clear:left"; >
#else
## get the decorated Portlet content
<div class="portal-layout-cell
portal-layout-cell-${layoutType}-${row}-${col}" >
#end
............... //here goes if ($editing) etc.
#if($f.type == "portlet")
$jetspeed.setCurrentFragment($f)
#if($f.id == "oilgas-oilcontent")
#set($putinonediv = "true")
#else
#set($putinonediv = "false")
#end
#parse($f.decoration.template)
#else
$jetspeed.setCurrentFragment($f)
$f.renderedContent
#end
</div>
#if($f.id == "oilgas-issue")
</div>
#end
#end
</div>
#set ($columnIndex = $columnIndex + 1)
#end
</div>
Thanks a lot Jacek, your $f.id gave me the whole idea :)
Elif
On 10/4/06, Jacek Wiślicki <[EMAIL PROTECTED]> wrote:
Wiadomosc od Elif Guner z 2006-10-04 18:46 brzmiala:
> Thanks very much Jacek, that helps.
> But I have another question that's a bit more complex. You know in
> layout.vm every time you add a portlet into a column, it encloses it
> within a div. I want to put two different portlets within one div.
> That's one of the reasons I wanted to get the parent and then I was
> gonna try to find out a way to include the portlet content within the
> parent. To be more specific, what I want to do is, I have a 3 column
> layout in a row. The middle column is 500px wide. I have a portlet
> which is in a div that is 300px wide. I have two small portlets that
> are 190 px wide. Now, my large portlet has more content so its height
> is bigger than two small ones. What I'd like to do is, put the large
> portlet in the column, and then put the small ones near it so that
> large is on the left and 2 small next to it. But to do this, I need to
> put two small ones in one div and make this div style float:left. And
> the little portlets' own div syles will be clear:left. I got the
> source html of the portal and changed the code to do this, to see if
> it'd result the way I expected and yes it did.
> So, this is what I was trying to do.
> Thanks for your help...
Well, your structure is rather complex, indeed. Some nested layout could
help. Have you considered adding to Jetspeed your own layout?
--
pozdrawiam,
Jacek Wislicki
[EMAIL PROTECTED]
http://www.nauka-biznes.org.pl/jetspeed/portal/
tel.: +48 502 408 444
gg: 2540358
skype: jacek_wislicki
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]