<div>Only problem is I am using a dtml-in inside the category_results method which calls a sql method and it now gives me an error:</div>
<div>&lt;dtml-in expr=&quot;category_match1(_)&quot; size=50 start=query_start&gt;<br>...</div>
<div>&lt;/dtml-in&gt;</div>
<div>&nbsp;</div>
<div>Perhaps its not finding the title1 value I am trying to pass to it?</div>
<div>&nbsp;</div>
<div><strong>Error Type: NameError<br>Error Value: global name 'category_match1' is not defined</strong><br>&nbsp;</div>
<div><span class="gmail_quote">On 8/29/05, <b class="gmail_sendername">Peter Bengtsson</b> &lt;<a href="mailto:peterbe@gmail.com">peterbe@gmail.com</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Better<br><br>&lt;dtml-let orig_title=&quot;'Hannoverian Stallions Lauries Crusador ' &quot;&gt;<br>&lt;dtml-with links&gt;
<br>&lt;dtml-var &quot;catagory_results(_, _.None, title1=orig_title)&quot;&gt;<br>&lt;/dtml-with&gt;<br>&lt;/dml-let&gt;<br><br>Use dtml-let and notice the extra _ in the parameters. I doubt that<br>DTML methods accept plain arguments except self, REQUEST and RESPONSE.
<br>All other things must be passed with keyword arguments.<br><br><br>On 8/30/05, Sean Kelley &lt;<a href="mailto:kelleyfarm@gmail.com">kelleyfarm@gmail.com</a>&gt; wrote:<br>&gt; I tried using orig_title in the format &lt;dtml-var orig_title&gt; in the called
<br>&gt; dtml-method (category_results) and I get a zope error which I don't<br>&gt; understand:<br>&gt; Error Type: TypeError<br>&gt; Error Value: sequence index must be integer<br>&gt;<br>&gt; When I call it in the orignal page which I want the title for it works fine.
<br>&gt;<br>&gt;<br>&gt; John Eikenberry jae-zope at <a href="http://kavi.com">kavi.com</a><br>&gt; Mon Aug 29 16:05:37 EDT 2005<br>&gt;<br>&gt;<br>&gt;<br>&gt; Previous message: [Zope] passing a parameter - namespace and dtml-with
<br>&gt; Next message: [Zope] zope 2.8 command line tracebacks<br>&gt; Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]<br>&gt; ________________________________<br>&gt;&nbsp;&nbsp;Sean Kelley wrote:<br>&gt;<br>&gt; &gt; I am trying to pass the title of a page to a dtml method which is in
<br>&gt; another<br>&gt; &gt; folder named links. If I pass the actual title like below everything<br>&gt; works.<br>&gt; &gt; However, when I try to pass the value of the current title to<br>&gt; &gt; category_results using various other methods it does not.
<br>&gt; &gt; What is the syntax so that I can pass the current value of &lt;dtml-var<br>&gt; title&gt;<br>&gt; &gt; to the method? Would the dtml-with block change the namespace it pulls the<br>&gt; &gt; title variable from to the context of the method category_results in the
<br>&gt; &gt; links folder?<br>&gt;<br>&gt; Yes.<br>&gt;<br>&gt; Here's a quick hack that will work.<br>&gt;<br>&gt; &lt;dtml-call &quot;REQUEST.set('orig_title',this().title)&quot;&gt;<br>&gt; &lt;dtml-with links&gt;<br>
&gt; &lt;dtml-var &quot;catagory_results(_.None,REQUEST.get('orig_title'))&quot;&gt;<br>&gt; &lt;/dtml-with&gt;<br>&gt;<br>&gt; &gt; &lt;dtml-with links&gt;<br>&gt; &gt; &lt;dtml-comment&gt;This line works&lt;/dtml-comment&gt;
<br>&gt; &gt; &lt;dtml-var &quot;category_results(_.None, _, title1='Hannoverian Stallions<br>&gt; Lauries<br>&gt; &gt; Crusador ')&quot;&gt;<br>&gt; &gt; &lt;/dtml-with&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; _______________________________________________
<br>&gt; Zope maillist&nbsp;&nbsp;-&nbsp;&nbsp;<a href="mailto:Zope@zope.org">Zope@zope.org</a><br>&gt; <a href="http://mail.zope.org/mailman/listinfo/zope">http://mail.zope.org/mailman/listinfo/zope</a><br>&gt; **&nbsp;&nbsp; No cross posts or HTML encoding!&nbsp;&nbsp;**
<br>&gt; (Related lists -<br>&gt;&nbsp;&nbsp;<a href="http://mail.zope.org/mailman/listinfo/zope-announce">http://mail.zope.org/mailman/listinfo/zope-announce</a><br>&gt;&nbsp;&nbsp;<a href="http://mail.zope.org/mailman/listinfo/zope-dev">http://mail.zope.org/mailman/listinfo/zope-dev
</a> )<br>&gt;<br>&gt;<br>&gt;<br><br><br>--<br>Peter Bengtsson,<br>work <a href="http://www.fry-it.com">www.fry-it.com</a><br>home <a href="http://www.peterbe.com">www.peterbe.com</a><br>hobby <a href="http://www.issuetrackerproduct.com">
www.issuetrackerproduct.com</a><br></blockquote></div><br><br clear="all"><br>-- <br>Sean Kelley<br>