If I have a topic template containing this code

Error: no such plugin chili

%STARTSECTION{type="expandvariables"}%
%FOREACH{"host" in="%URLPARAM{"Hostgroups"}%"}%
   * $host
%NEXT{"host"}%
%ENDSECTION{type="expandvariables"}%

and I create a page using this templatetopic, passing ...&Hostgroups=a%2C+b%2C+c%2C+d

I expect to get

   * a
   * b
   * c

in the resulting page.

%FOREACH should be run and expanded when the template is copied.

-- VickiBrown - 10 Aug 2010

Corrected spelling in the component field.

This could be a simple or complex fix; ForEachPlugin doesn't use registerTagHandler(), so as usual these types of macros are difficult to make consistent when it comes to edge cases in macro expansion behaviour.

For what it's worth, Foswiki 1.1's FOREACH macro accomplishes nearly the same thing and is in fact implemented with registerTagHandler()

-- PaulHarvey - 11 Aug 2010

Thanks. We'll look into Foswiki 1.1's FOREACH macro when we can. That may be a simler way to go. (Is if backward compatible to the Plugin? We have a LOT of pages...)

-- VickiBrown - 11 Aug 2010

No, it operates in a very different way. I will try to create an FAQ for how they're different and how to re-work your wiki apps to use the new macro.

We are tracking the issue in Item2382. I have made it a release blocker because you are not the only one that will be burnt by the new feature conflicting with the old plugin.

-- PaulHarvey - 12 Aug 2010
 

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons LicenseGet Foswiki at sourceforge.net. Fast, secure and Free Open Source software downloads