[ 
https://issues.apache.org/jira/browse/FREEMARKER-70?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Dekany resolved FREEMARKER-70.
-------------------------------------
       Resolution: Fixed
    Fix Version/s: 2.3.27-incubating

Fix committed.

> Loop Variables Not Resolving when used in string interpolations
> ---------------------------------------------------------------
>
>                 Key: FREEMARKER-70
>                 URL: https://issues.apache.org/jira/browse/FREEMARKER-70
>             Project: Apache Freemarker
>          Issue Type: Bug
>          Components: engine
>    Affects Versions: 2.3.26-incubating
>            Reporter: Bill Parkinson
>             Fix For: 2.3.27-incubating
>
>
> When invoking a macro inside of a #list  the loop variable is not in scope to 
> be used resolving the argument values to the macro call.
> Example
> {code:java}
> <#macro button caption>
> content irrelevant.
> </#macro>
> <#list ["a","b","c"]>
> <#items as loopvar>
> ${loopvar?counter} -- works
> ${loopvar?index} -- works
> <p class="${loopvar?index}"> -- works
> <@button caption="${loopvar?index}" /> -- FAILS
> </#items>
> </#list>
> {code}
> The @button macro call fails with the message:
> The left hand operand of ?index must be a loop variable, but there's no loop 
> variable in scope with this name: loopvar
> Shouldn't loopvar be in scope for evaluating those macro argument values?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to