velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <ge...@optonline.net>
Subject Re: template layout using foreach
Date Thu, 07 Mar 2002 09:49:47 GMT
On 3/7/02 12:31 AM, "Ken Anderson" <ka@pacific.net> wrote:

> 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></t
> r>
> #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?
>

Do you mean how to access things w/o the #foreach()?

Depending on what $rowset is, seems fine by me...

-- 
Geir Magnusson Jr.                                     geirm@optonline.net
System and Software Consulting
Java : the speed of Smalltalk with the simple elegance of C++... 


--
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