velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Kaufman" <BKauf...@zaplet.com>
Subject RE: For() or while() in VTL...
Date Tue, 08 Oct 2002 20:28:22 GMT
>     I need to walk through a List, but I need to step every 2 
> items in the list. Is there a for() or while() in Velocity?

#foreach

If you want to skip every other item, you'd need to do something like,

	#set( $isOdd = $velocityCount % 2 )
	#if( $isOdd )
		## ... Your code here
	#end

> Once again, is there a more
> complete VTL Reference?

http://jakarta.apache.org/velocity/user-guide.html
http://jakarta.apache.org/velocity/vtl-reference-guide.html

> Are there libraries for Velocity? Hope so...

http://jakarta.apache.org/builds/jakarta-velocity/

                                                      -- Bill K.

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