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

Reply via email to