velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Freeman" <aa...@layerz.com>
Subject RE: Building Tables with VTL
Date Thu, 14 Aug 2003 15:27:46 GMT
Maybe:

#foreach( $row in $rowList)
<tr>
 #foreach( $col in [1..3])
 <td>${myObject.getItem($row, $col)}</td>
 #end
</tr>		
#end

Aaron Freeman
Layer-Z, Inc.
Phone: (316) 722-8808
Fax: (215) 895-9813
aaron@layerz.com
http://www.layerz.com/


> -----Original Message-----
> From: Met @ Uber [mailto:met@uberstats.com]
> Sent: Thursday, August 14, 2003 10:13 AM
> To: Velocity Users List
> Subject: RE: Building Tables with VTL
> 
> 
> 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
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> 
> 

Mime
View raw message