[ZPT] Zpt, scripts and context problems
Karolin Marakool
kmarakool at flowcom.com.au
Tue Nov 11 18:08:03 EST 2003
Hi All,
I've come across a problem with getting the right context when calling a
script from a page template.
The scenario is as follows:
the page template "ip_template" in root folder:
<html metal:define-macro="master">
............
<div
metal:use-macro="here/ui_slots/relatedlinks_slot/macros/relatedLinks|default
" />
..........
the relatedLinks template in ui_slots/ folder:
...........
<div metal:define-macro="relatedLinks"
tal:define="rlinks here/scripts/navRelated;>
............
</div>
the navRelated script in scripts/ folder:
if hasattr(context.aq_explicit, 'subject'):
subjects=context.subject
/* for testing purposes */
return context.title_or_id()
.........
the page template calling the master macro:
<html metal:use-macro="here/ip_template/macros/master">
.......
</html>
The problem is I keep on getting "scripts" as the context id being returned
instead of the page template.
Any ideas on what is going on what I can do to fix it?
Thanks,
kmkl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.zope.org/pipermail/zpt/attachments/20031112/81ad940b/attachment.html
More information about the ZPT
mailing list