on or about, Friday, January 03, 2003, we have reason to believe that beno wrote something along the lines of :
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' />
This is (luckily ;) ) not the way ZPT works. Try this (untested code) for your script template_id = template_id[:-4] if (template_id[:-5] != 'frame'): template_id = template_id + '_frame' newpath = 'here/' + template_id + '_content/macros/content' return newpath and change your call to : <p tal:replace="structure python:path(here.contentMacro(template.id))" /> this should (i hope) give you what you want, although it does not seem like a very clean solution. -- Geir Bækholt geir@funcom.com Tools/HCI-developer Tools/Billing - Product Operations Funcom Oslo