[Templates] setting macro parameters at run time
[prev]
[thread]
[next]
[Date index for 2004/06/18]
G'day,
Is there a way to set the parameters to a macro at run time?
So I have a macro like so:
[%- MACRO foo(bar,baz) BLOCK -%]
[%# do some stuff here %]
[%- END -%]
But I want to call the macro like so:
<td>foo(bar="blah", baz= "blah" _ [% ANOTHER_VARIABLE %])</td>
But I get error message like so:
file error - parse error - myfile.tt2 line 46: unexpected token (%)
[% filter("rt=COD","Collection Occasions<a href=\"[% PUBLISH_DESTINATION %]
Is there a workaround for this problem? Or am I just doing it wrong?
Thanks,
Jens
_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates
 |
[Templates] setting macro parameters at run time
Jens Porup 05:29 on 18 Jun 2004
|