<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1264" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=531144822-11112003><FONT face=Arial size=2>Hi
All,</FONT></SPAN></DIV>
<DIV><SPAN class=531144822-11112003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=531144822-11112003><FONT face=Arial size=2>I've come across a
problem with getting the right context when calling a script from a page
template.</FONT></SPAN></DIV>
<DIV><SPAN class=531144822-11112003><FONT face=Arial size=2>The scenario is as
follows:</FONT></SPAN></DIV>
<DIV><SPAN class=531144822-11112003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=531144822-11112003><FONT face=Arial size=2>the page
template <SPAN class=156475722-11112003><FONT color=#0000ff> <FONT
color=#000000>"ip_template"</FONT> </FONT></SPAN>in root
folder:</FONT></SPAN></DIV>
<DIV><SPAN class=531144822-11112003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=531144822-11112003><FONT face=Arial size=2><html
metal:define-macro="master"></FONT></SPAN></DIV>
<DIV><SPAN class=531144822-11112003><FONT face=Arial
size=2>............</FONT></SPAN></DIV>
<DIV><SPAN class=531144822-11112003><FONT face=Arial
size=2><div metal:use-macro="here/ui_slots/relatedlinks_slot/macros/relatedLinks|default"
/></FONT></SPAN></DIV>
<DIV><SPAN class=531144822-11112003><FONT face=Arial
size=2>..........</FONT></SPAN></DIV>
<DIV><SPAN class=531144822-11112003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=531144822-11112003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=531144822-11112003><FONT face=Arial size=2>the relatedLinks
template in ui_slots/ folder:</FONT></SPAN></DIV>
<DIV><SPAN class=531144822-11112003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=531144822-11112003><FONT face=Arial
size=2>...........</FONT></SPAN></DIV>
<DIV><SPAN class=531144822-11112003><FONT face=Arial
size=2><div metal:define-macro="relatedLinks"<BR>
tal:define="rlinks here/scripts/navRelated;></FONT></SPAN></DIV>
<DIV><SPAN class=531144822-11112003><FONT face=Arial
size=2>............</FONT></SPAN></DIV>
<DIV><SPAN class=531144822-11112003><FONT face=Arial
size=2></div></FONT></SPAN></DIV>
<DIV><SPAN class=531144822-11112003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=531144822-11112003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=531144822-11112003><FONT size=+0><FONT face=Arial size=2>the
navRelated script in scripts/ folder:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>if hasattr(<SPAN
class=531144822-11112003>context</SPAN>.aq_explicit,
'subject'):<BR> subjects=c<SPAN
class=531144822-11112003>ontext</SPAN>.subject</FONT></DIV>
<DIV><FONT size=+0><SPAN class=531144822-11112003></SPAN><FONT face=Arial><FONT
size=2>/<SPAN class=531144822-11112003>* for testing purposes
*/</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT size=+0><FONT size=+0><SPAN class=531144822-11112003></SPAN><SPAN
class=531144822-11112003></SPAN><FONT face=Arial><FONT size=2>r<SPAN
class=531144822-11112003>eturn context.title_or_id()</SPAN><BR><SPAN
class=531144822-11112003></SPAN>.<SPAN
class=531144822-11112003>........</SPAN></FONT></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=531144822-11112003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=531144822-11112003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=531144822-11112003>the page template
calling the master macro:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=531144822-11112003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=531144822-11112003><html
metal:use-macro="here/ip_template/macros/master"></SPAN></FONT></DIV>
<DIV><SPAN class=156475722-11112003><FONT face=Arial color=#0000ff
size=2>.......</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=531144822-11112003></html><BR></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=531144822-11112003></SPAN></FONT><FONT
face=Arial size=2><SPAN class=531144822-11112003></SPAN></FONT> </DIV>
<DIV><SPAN class=531144822-11112003><FONT face=Arial><FONT size=2>The problem is
I keep on getting "scripts" as the context id being returned instead of the
page template.<SPAN class=156475722-11112003><FONT
color=#0000ff> </FONT></SPAN></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=531144822-11112003><FONT face=Arial><FONT size=2><SPAN
class=156475722-11112003>Any ideas on what is going on what I can do to fix
it?</SPAN></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=531144822-11112003><FONT face=Arial><FONT size=2><SPAN
class=156475722-11112003></SPAN></FONT></FONT></SPAN> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=156475722-11112003>Thanks,</SPAN></FONT></DIV>
<DIV></FONT></SPAN><FONT face=Arial color=#0000ff size=2><SPAN
class=156475722-11112003><FONT
color=#000000>kmkl</FONT> </SPAN></FONT></DIV></BODY></HTML>