cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yves Vindevogel <yves.vindevo...@implements.be>
Subject Re: Table with multiple rows in xsp:logic
Date Tue, 26 Apr 2005 08:02:43 GMT
I want one row with 4 elements on it, so I need to include an extra 
part when my counter is 4, 8, ....

On 26 Apr 2005, at 08:59, Linden H van der (MI) wrote:

> Hi Yves,
>  
> Haven't tested this, but what about:
>  
> <xsp:logic>
> for (each row) {
>     <xsp:element name="tr">
>     <xsp:logic>
>       for (each column) {
>          <xsp:element name="td">
>             <xsp:text>cell content</xsp:text>
>          </xsp:element>
>       }
>     </xsp:logic>
>    </xsp:element>
> }
> </xsp:logic>
>  
>  
> Bye, Helma
>> -----Original Message-----
>> From: Yves Vindevogel [mailto:yves.vindevogel@implements.be]
>> Sent: Monday, 25 April, 2005 21:32
>> To: users@cocoon.apache.org
>> Subject: Table with multiple rows in xsp:logic
>>
>> Hi,
>>
>> What I want to do is pretty basic.
>> I have a loop in my results to show them inside a table
>> Every four columns, I want to start a new row.
>>
>> How can I do this ?
>>
>> The code below shows what I try to do, but does not work. (And it's 
>> not the == instead of the modulo)
>> I'm just trying stuff in there.
>>
>>
>>
>> <table>
>>
>> <tr>
>> <esql:row-results>
>> <xsp:logic>ct++ ;</xsp:logic>
>> <td>
>> <a href="#">>
>> <esql:get-string column="id"/>
>> </a>
>> </td>
>>
>> <xsp:logic>
>> if (ct == 4)
>> {
>> <xsp:text disable-output-escaping="true">&lt;tr&gt;</xsp:text>
>> } ;
>> </xsp:logic>
>> </esql:row-results>
>> </tr>
>> </table>
>>
>> Met vriendelijke groeten,
>> Bien à vous,
>> Kind regards,
>>
>> Yves Vindevogel
>> Implements
>>
>>
Met vriendelijke groeten,
Bien à vous,
Kind regards,

Yves Vindevogel
Implements


Mime
View raw message