velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <ge...@adeptra.com>
Subject Re: Question about #foreach
Date Sun, 14 Jul 2002 21:02:15 GMT
On 7/14/02 10:38 AM, "Ed Yu" <ekyu@asgnet.psc.sc.edu> wrote:

> I've got a question about the #foreach directive. When reading the docs,
> it mentioned about the index variable velocityCount within the
> directive. My question is what is the name of the variable if there is a
> nested #foreach construct:
> 
> #foreach ($objList in $objLists)
> #foreach ($obj in $objList)
> #end
> #end
> 
> How do I access the outer loop variable other than setting it explicitly
> like:
> 
> #foreach ($objList in $objLists)
> #set ($outerIndex = $velocityCount)
> #foreach ($obj in $objList)
> #end
> #end
> 

Set it explicitly :)

-- 
Geir Magnusson Jr. 
Research & Development, Adeptra Inc.
geirm@adeptra.com
+1-203-247-1713



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