[Zope] METAL question: relative reference to a macro defined
in the same file
Johan Carlsson
johanc at easypublisher.com
Fri Apr 9 05:12:36 EDT 2004
Mark Gibson wrote:
> Johan Carlsson wrote:
>
>>
>> Is it possible to refer to a macro defined in the same file
>> in a use-macro statement?
>>
>> Using:
>> <div metal:use-macro="template/macros/render_fields"/>
>> doesn't work because template is the main template called not
>> necessary the one containing the macro and the use-macro.
>>
>> Using:
>> <div metal:use-macro="here/pat/to/the/file/macros/render_fields"/>
>> does work but if I move the file I need to change the content,
>> and that's bade maintainability in my book :-)
Mark and Tonico,
Using Scripts doesn't "make things easier" which is what I wan't.
But obviously it's not possible with the current METAL/TAL
implementation, which I (imho) regard as a flaw.
Refering to the current script file can be useful in many scenarios.
(But I got other beefs with TAL/METAL as well ;-)
Thanks for the suggestion anyway, at least I now
know that I'm not missing anything :-)
Johan Carlsson
--
Johan Carlsson Tel: + 46 8 31 24 94
Colliberty Mob: + 46 70 558 25 24
Torsgatan 72 Email: johanc at easypublisher.com
SE-113 37 STOCKHOLM Skype: colliberty
More information about the Zope
mailing list