Hi!

I'm currently trying to pass some arbitrary values (basically a list) 
through a macro:

[% MACRO mt(msg) GET c.maketext(msg) %]

[% mt("Hello %1", c.user.name %]
[% mt("%1 does %2", 'foo', 'bar' %]

The problem ist that the above macro definition does not work like this. 
Using named parameters seems cumbersom. One alternative would be to pass 
the params in as an arrayref:

[% mt("%1 does %2", ['foo', 'bar'] %]

but what I'd actually love to do is something like:

[% MACRO mt(msg,@_) GET c.maketext(msg,@_) %]

is this possible somehow?

Thanks for any pointers...

-- 
#!/usr/bin/perl                              http://domm.plix.at
for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}

_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to