Thanks to both Paul and AJ -- both suggestions were helpful. The extended description Paul gave me below was particularly use.<br><br>Here&#39;s what I learned:<br>1) the form object is automagically handed to the template when you do a &#39;return context.mytemplate(item=&#39;something&#39;)<br>
2) I assumed that I would have to pass the form object to the template -- but this is not needed. More usefull is that when &#39;item&#39; is given to the template as parameter, shown above, that the template gets a NEW? namespace called &#39;options&#39;. &nbsp;I think this is new to me.<br>
3) then, within the template the tales expression options/item gives me &#39;something&#39;.<br><br>This really helps me understand better how script and templates work together. A year from now, I&#39;ll need to relearn this again and may google my answer above...<br>
<br>Thanks to all on the plone list.<br><br><div><span class="gmail_quote">On 9/10/08, <b class="gmail_sendername">Paul Winkler</b> &lt;<a href="mailto:slinkp@gmail.com">slinkp@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0; margin-left: 0.80ex; border-left-color: #cccccc; border-left-width: 1px; border-left-style: solid; padding-left: 1ex">
On Wed, Sep 10, 2008 at 07:57:29PM -0700, David Bear wrote:<br> &gt; I have a script that calls a template.<br> &gt;<br> &gt; The template has a tal expressions like this<br> &gt;<br> &gt; &lt;p tal:content=&quot;structure here/ploneDoc/getText&quot;&gt; &lt;/p&gt;<br>
 &gt;<br> &gt; I want my script to call the template in such a way that the string<br> &gt; &#39;ploneDoc&#39; is replaced by a different string.<br> &gt;<br><br>&gt; I&#39;m not sure how to go about parameterizing a tales expressions like<br>
 &gt; this.<br><br> It is possible, by sticking a question mark in front of ploneDoc; but<br> afaict you can only use a variable already in the namespace,<br> i.e. you&#39;d have to define it first.&nbsp;&nbsp;Like so:<br><br>&nbsp;&nbsp;&lt;p tal:define=&quot;docname options/ploneDoc&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;tal:content=&quot;structure here/?docname/getText&quot;&gt; &lt;/p&gt;<br><br> But I have literally never seen this obscure feature in real use,<br> because nobody seems to know about it (I had forgotten it myself), and<br>
 because it&#39;s not necessary. I&#39;d prefer to have the script just pass in<br> the object you want, as per this document:<br> <a href="http://plope.com/Books/2_7Edition/BasicScripting.stx#1-3">http://plope.com/Books/2_7Edition/BasicScripting.stx#1-3</a><br>
<br> So, in your script, something like:<br><br> doc = context.restrictedTraverse(some_path)<br> return context.mytemplate(mydoc=doc)<br><br> Then, in your template just do:<br><br> &lt;p tal:content=&quot;structure options/mydoc/getText&quot;&gt;&lt;/p&gt;<br>
<br><br><br> --<br><br> Paul Winkler<br> <a href="http://www.slinkp.com">http://www.slinkp.com</a><br> _______________________________________________<br> Zope maillist&nbsp;&nbsp;-&nbsp;&nbsp;<a href="mailto:Zope@zope.org">Zope@zope.org</a><br>
 <a href="http://mail.zope.org/mailman/listinfo/zope">http://mail.zope.org/mailman/listinfo/zope</a><br> **&nbsp;&nbsp; No cross posts or HTML encoding!&nbsp;&nbsp;**<br> (Related lists -<br>&nbsp;&nbsp;<a href="http://mail.zope.org/mailman/listinfo/zope-announce">http://mail.zope.org/mailman/listinfo/zope-announce</a><br>
&nbsp;&nbsp;<a href="http://mail.zope.org/mailman/listinfo/zope-dev">http://mail.zope.org/mailman/listinfo/zope-dev</a> )<br></blockquote></div><br><br clear="all"><br>-- <br>David Bear<br>College of Public Programs at ASU<br>602-464-0424