Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jakarta-velocity Wiki" 
for change notification.

The following page has been changed by Stephen Popp:
http://wiki.apache.org/jakarta-velocity/VelocityCommaIfNeeded

The comment on the change is:
Added more documentation and changed the name of one macro variable - is tested.

------------------------------------------------------------------------------
  
  To VM_global_library.vm add the '''commaIfNeeded''' macro:
  {{{
- ### Add a comma if needed - pass in $velocityCount for $count
+ ##-----------------------------------------------------------------
+ ## Add commas in a comma separated list to all items but the last
+ ## Param: $index - pass in $velocityCount
+ ## Param: $list  - pass in your velocity list variable
+ ##-----------------------------------------------------------------
- #macro('''commaIfNeeded''' $count $list)
+ #macro(commaIfNeeded $index $list)
  #set ( $lastone = $list.Count - 1 )
- #if( $count <= $lastone ),
+ #if( $index <= $lastone ),
  #else
  
  #end

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to