[ZPT] Zpt, scripts and context problems
Karolin Marakool
kmarakool at flowcom.com.au
Tue Nov 11 18:05:01 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 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:
The problem is I keep on getting "scripts" as the context id being returned
instead of the page template.
_______________________________________________
Karolin Marakool
Web Development
Flow Communications Pty. Ltd.
Phone: +61 2 9263 5000
Direct: +61 2 9263 5046
Web: < http://www.flow.com.au/ <http://www.flow.com.au/> >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.zope.org/pipermail/zpt/attachments/20031112/84951e5e/attachment.html
More information about the ZPT
mailing list