8 Apr
2004
8 Apr
'04
8:37 p.m.
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 :-)
Why do you need to move your templates? Do you move scripts, images and CSS files as well? Where do you store your content? You can write a Python script that returns a macro if you want to change your path dynamically. Tonico