You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Byron Foster (JIRA)" <de...@velocity.apache.org> on 2009/02/18 06:19:02 UTC
[jira] Resolved: (VELOCITY-696) Add index parameter to #foreach
directive to define an index variable
[ https://issues.apache.org/jira/browse/VELOCITY-696?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Byron Foster resolved VELOCITY-696.
-----------------------------------
Resolution: Fixed
I've moved this functionality into a custom directive called #for which can be accessed from the directive.contrib directory using the velocity property
userdirective = org.apache.velocity.runtime.directive.contrib.For
> Add index parameter to #foreach directive to define an index variable
> ---------------------------------------------------------------------
>
> Key: VELOCITY-696
> URL: https://issues.apache.org/jira/browse/VELOCITY-696
> Project: Velocity
> Issue Type: Improvement
> Components: Engine
> Affects Versions: 2.0
> Reporter: Byron Foster
>
> Allow the following:
> #foreach($user in $users index $i)
> #end
> So that $i holds the current index number of the iteration. This is similar in functionality to the implicitly defined index variable, except this is more explicit.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org