[Zope] ZPT Problem
Dieter Maurer
dieter@handshake.de
Fri, 3 Jan 2003 20:27:57 +0100
beno wrote at 2003-1-3 05:40 -0400:
> I have a python script I call from a page template. Here's the call:
>
> <p tal:replace="structure python:here.contentMacro(template.id)" />
>
> Here's the script:
>
> template_id = template_id[:-4]
> if (template_id[:-5] != 'frame')
> template_id = template_id + '_frame'
> content = "<p tal:replace='here/" + template_id + "_content/macros/content'
> />\n"
> print content
> return printed
>
> If this is called from either *index.zpt* or *index_frame.zpt* it renders
> the following code:
>
> <p tal:replace='here/index_frame_content/macros/content' />
When you want to expand a macro, you should use the attribute
designed for this, that is "metal:use-macro"...
Dieter