velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Don Laursen" <...@darkphoton.com>
Subject RE: Nesting in Velocity
Date Fri, 02 Feb 2001 16:53:07 GMT
>
> Velocity questions go to the Velocity list. In case you
> missed it, this is
> the Turbine list.
>
Oops, I asked for that one, :o
My question was spawned by using a single "=" instead of "==" to test for
equivelance of two variables. I was referencing the latest documentation,
but didn't have this simple operator. So leave it to me to get caught up on
the simple things...Doh!


Can this be added to the Velocity docs?


I suggest to append to the "Logical Operators" section:


Testing equivelance of Velocity variables:

         #set ($foo = "some value")
         #set ($bar = "some other value")

	   #if ($foo == $bar)
            do something here if they equate
         #else
            do something here is they are not the same
         #end



Nesting Loops:
(not sure how deep you can go)


   #foreach ($bigitem in $biglist)
       do something here...

           #foreach ($smallitem in $smalllist)
                do something here...

                    #foreach ($tinyitem in $tinylist)
                       do something here...

                    #end
           #end
    #end











Mime
View raw message