velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Met @ Uber" <...@uberstats.com>
Subject RE: Building Tables with VTL
Date Thu, 14 Aug 2003 15:12:31 GMT
Thanks, but perhaps I didn't explain myself to well.  If I had an array
where I can access it through indexes I would print my table as such.

<tr>
  <td> $item[0] </td>
  <td> $item[1] </td>
  <td> $item[2] </td>
</tr>
<tr>
  <td> $item[3] </td>
  <td> $item[4] </td>
  <td> $item[5] </td>
</tr>

It needs to be dynamically generated across and down.  So I need some
sort of #foreach with a counter I'm guessing.

Any suggestions?

On Thu, 2003-08-14 at 09:49, Mark Lybarger wrote:
> <table>
> #foreach( $item in $myList)
> 	<tr>
> 		<td></td>
> 		<td></td>
> 		<td></td>
> 	</tr>		
> #end
> </table>
> 
> -----Original Message-----
> From: Matthew Metnetsky [mailto:matt@uberstats.com]
> Sent: Thursday, August 14, 2003 8:59 AM
> To: Velocity User
> Subject: Building Tables with VTL
> 
> 
> I'm trying to build a table (3 columns by X rows) which would be
> extremely easy if I could use for/while loops, but I can't.  
> 
> As I'm sure this has been done, I was wondering if anyone could give me
> a shove in the right direction.  
> 
> -------------
> |   |   |   |
> -------------
> |   |   |   |
> -------------
> 
> Thanks in advance,
> 
> ~ Matthew
> 
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.509 / Virus Database: 306 - Release Date: 8/12/2003
>  
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.509 / Virus Database: 306 - Release Date: 8/12/2003
>  
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
-- 
Met @ Uber <met@uberstats.com>
Uberstats


Mime
View raw message