> You can return a scalar (but not an array or hash ref) in
> the macro's output, and capture it in a variable using SET.
> 
> 
> $ tpage
> [% MACRO seven BLOCK; "7"; END %]
> ! starting...
> [% SET var = 3 %]
> ! var before = [% var %]
> [% SET var = seven() %]
> ! var after = [% var %] (wanted 7 here)
> [%####################################%]
> 
> ! starting...
> 
> ! var before = 3
> 
> ! var after = 7 (wanted 7 here)

Cooool! :-)
Many thanks.

Gabor

_______________________________________________
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to