Velocity
  1. Velocity
  2. VELOCITY-239

#foreach (${item} in ${list}) behavior inconsistent with #foreach ($item in $list)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.1
    • Fix Version/s: 1.5
    • Component/s: Engine
    • Labels:
      None
    • Environment:
      Operating System: other
      Platform: Other

      Description

      1) #foreach ($

      {item} in ${list})

      2) #foreach ($item in $list)

      Is there a practical reason why the first notation fails to populate $item?

      I'm guessing it's purely a technical reason (doesn't get parsed properly,
      maybe creates a variable named "{item}

      " instead).

        Activity

        Hide
        Mike Kienenberger added a comment -

        Created an attachment (id=9651)
        1.3.1 /test/templates/foreach-variable.vm diff with test $foreach $

        {item}
        Show
        Mike Kienenberger added a comment - Created an attachment (id=9651) 1.3.1 /test/templates/foreach-variable.vm diff with test $foreach $ {item}
        Hide
        Mike Kienenberger added a comment -

        Created an attachment (id=9652)
        1.3.1 /test/templates/foreach-variable.cmp diff with test $foreach $

        {item}
        Show
        Mike Kienenberger added a comment - Created an attachment (id=9652) 1.3.1 /test/templates/foreach-variable.cmp diff with test $foreach $ {item}
        Hide
        Geir Magnusson Jr added a comment -

        fixed. thx

        Show
        Geir Magnusson Jr added a comment - fixed. thx

          People

          • Assignee:
            Unassigned
            Reporter:
            Mike Kienenberger
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development