On Tue, Feb 23, 2010 at 09:07, Stefan Bachert <[email protected]> wrote:
Ok, let's go into details.
I want to create a macro which build a <select> with its <option> tag. Let call them {{buildSelect values=.. /}} For the option items I need a list of string values calling {{buildSelect values=["a","b","c"] /}} does not work. Display values in the macro just shows "[".
You need to escape " because it's part of the macro parameter syntax. {{buildSelect values=[~"a~",~"b~",~"c~"] /}} But are you sure you need " characters ? {{buildSelect values=a,b,c /}} should be enough Unless you want to interpret this string as velocity code in a wiki macro but it seems very dangerous (a user could put any velocity he wants as parameter of your macro).
OK, there is a workaround. Passing a string
{{buildSelect values=["a|b|c"] /}} and applying $util.split works
I guess this is a bug. -- View this message in context: http://n2.nabble.com/macros-and-lists-tp4611119p4617554.html Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Thomas Mortagne