velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken Anderson ...@pacific.net>
Subject template layout using foreach
Date Thu, 07 Mar 2002 05:31:35 GMT
  For a product list displayed in rows, I'd do something like this:

<table>
#foreach ($row in $rowset)
<tr><td>$row.id</td><td>$row.name</td><td>$row.desc</td><td>$row.price</td></tr>
#end
</table>

What is the best way to handle a more free form display in the template?
I've found that using $rowset.get(1).name works.
Is this the proper syntax? Is there a better way?

Thanks,
Ken Anderson




--
To unsubscribe, e-mail:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>


Mime
View raw message