The correct syntax would be:

<ww:if test="@status/modulus(maxThumbsPerRow) == 0")

More information here:

  http://www.opensymphony.com/webwork/api/webwork/view/taglib/IteratorStatus.html

Cheers,
Scott

On Tue, Jan 20, 2004 at 12:57:13PM -0500, Hani Suleiman wrote:
> You're better off using the mod operator, something like if status % 3 
> == 0 then br (for 3 items per line), so in your case it'd be (from 
> memory, so exact syntax might be wrong)
> 
> <ww:if test="@status % maxThumbsPerRow == 0"><br></ww:if>
> 
> Rich wrote:
> > Let's say I had something like below:
> >  
> > What this is trying to do is display images.
> > I would like it to display only a certain amount per row, defined by the 
> > variable "maxThumbsPerRow".
> > I figured the best way to do this would be to check if "@status/index" 
> > divided by "maxThumbsPerRow" is equal to 0. If this is true, just add a 
> > line break.
> > I'm just not sure how or if I can do the division in the "<ww:if" tag.
> > Can I do it this way? Or is there an easier way and I'm just trying to 
> > do it the complicated way?
> >  
> > <ww:subset source="album/images" start="begin" count="total" />
> >     <ww:iterator status="'status'">
> >         Display stuff.
> >    
> >         <ww:if test=
> >             <br>
> >         </ww:if>
> >     </ww:iterator>
> > </ww:subset>
> 
> 
> 
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004
> Premiere Conference on Open Tools Development and Integration
> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> http://www.eclipsecon.org/osdn
> _______________________________________________
> Opensymphony-webwork mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to