[ZPT] question regarding scope of defines
Sun, 20 Jan 2002 23:32:07 +0100
Robert Rottermann writes:
> I would like to define variables by "importing" them from a template like
> <div tal:define="global picture string:pic.jpg"
> <span tal:replace="here/include.pt"></span>
> <img tal:attributes="src picture">
> If I run that I get an error, that picture is not defined.
> Error Type: Undefined
> Error Value: "picture" not found in "picture"
> Am I trying to do something tal is not meant for
Yes, use "metal" macros!
> or is there some other way
> to have the value of an variable defined outside of the actual template?
No, not with TAL (alone) -- with the exception of acquisition.