<!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>&nbsp;</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>&nbsp;</DIV>
<DIV><SPAN class=531144822-11112003><FONT face=Arial size=2>the page template in 
root folder:</FONT></SPAN></DIV>
<DIV><SPAN class=531144822-11112003><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=531144822-11112003><FONT face=Arial size=2>&lt;html 
metal:define-macro="master"&gt;</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>&lt;div&nbsp;metal:use-macro="here/ui_slots/relatedlinks_slot/macros/relatedLinks|default" 
/&gt;</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>&nbsp;</FONT></SPAN></DIV>
<DIV><SPAN class=531144822-11112003><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</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>&nbsp;</DIV>
<DIV><SPAN class=531144822-11112003><FONT face=Arial 
size=2>...........</FONT></SPAN></DIV>
<DIV><SPAN class=531144822-11112003><FONT face=Arial 
size=2>&lt;div&nbsp;metal:define-macro="relatedLinks"<BR>&nbsp;&nbsp;&nbsp;&nbsp; 
tal:define="rlinks here/scripts/navRelated;&gt;</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>&lt;/div&gt;</FONT></SPAN></DIV>
<DIV><SPAN class=531144822-11112003><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=531144822-11112003><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=531144822-11112003><FONT><FONT face=Arial size=2>the navRelated 
script in scripts/ folder:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>if hasattr(<SPAN 
class=531144822-11112003>context</SPAN>.aq_explicit, 
'subject'):<BR>&nbsp;&nbsp;&nbsp; subjects=c<SPAN 
class=531144822-11112003>ontext</SPAN>.subject</FONT></DIV>
<DIV><FONT><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><FONT><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>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=531144822-11112003></SPAN></FONT>&nbsp;</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>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=531144822-11112003></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=531144822-11112003></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=531144822-11112003>The problem is I 
keep on getting "scripts"&nbsp;as the context id being returned instead of the 
page template.</SPAN></DIV>
<DIV><BR></DIV></FONT>
<DIV><FONT face=Arial><BR><FONT size=2></FONT></FONT></DIV></FONT></SPAN>
<P><FONT face=Arial color=#808000 
size=2>_______________________________________________<BR><B></B></FONT><B></B><B><FONT 
face=Tahoma color=#808000 size=1>Karolin Marakool<BR></FONT></B><FONT 
face=Tahoma color=#808000 size=1>Web Development<BR>Flow Communications Pty. 
Ltd.<BR>Phone: +61 2 9263 5000<BR>Direct: +61 2 9263 5046</FONT><BR><FONT 
face=Tahoma color=#808000 size=1>Web:<U> &lt;<A href="http://www.flow.com.au/" 
target=_blank>http://www.flow.com.au/</A>&gt;</U></FONT> </P>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV></BODY></HTML>