[Zope] ZPT newbie question

Marie Robichon robichon@esrf.fr
Thu, 08 Aug 2002 18:00:14 +0200


--=====================_34449489==_.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed

At 10:50 08/08/02 -0500, you wrote:
> > How do I do the following in ZPT please?
> >
> > <dtml-if "REQUEST.has_key('nofile')">
> > Please enter a file name by browsing your system
> > </dtml-if>
>
>Try something like this:
>
>   <span tal:omit-tag="" tal:condition="REQUEST/has_key('nofile')">
>   Please enter a filename by browsing your system.
>   </span>
>
>The condition might need to be "python:REQUEST.has_key('nofile')".
>
>// mark
>-

Thanks for the quick reply but that doesn't work I get the following 
error.  I am in fact trying to trap if I have done a
RESPONSE.redirect (fileinput?nofile = 1) to the ZPT in which case I display 
the text otherwise the user just gets the file input box to fill in.

Error Type: Undefined
Error Value: REQUEST not found in "REQUEST/has_key('nofile')", at line 6, 
column 4

THX

Marie
--=====================_34449489==_.ALT
Content-Type: text/html; charset="us-ascii"

<html>
At 10:50 08/08/02 -0500, you wrote:<br>
<blockquote type=cite class=cite cite>&gt; How do I do the following in
ZPT please?<br>
&gt; <br>
&gt; &lt;dtml-if &quot;REQUEST.has_key('nofile')&quot;&gt;<br>
&gt; Please enter a file name by browsing your system<br>
&gt; &lt;/dtml-if&gt;<br>
<br>
Try something like this:<br>
<br>
&nbsp; &lt;span tal:omit-tag=&quot;&quot;
tal:condition=&quot;REQUEST/has_key('nofile')&quot;&gt;<br>
&nbsp; Please enter a filename by browsing your system.<br>
&nbsp; &lt;/span&gt;<br>
<br>
The condition might need to be
&quot;python:REQUEST.has_key('nofile')&quot;.<br>
<br>
// mark<br>
-</blockquote><br>
Thanks for the quick reply but that doesn't work I get the following
error.&nbsp; I am in fact trying to trap if I have done a <br>
RESPONSE.redirect (fileinput?nofile = 1) to the ZPT in which case I
display the text otherwise the user just gets the file input box to fill
in.<br>
<br>
<b>Error Type: Undefined<br>
Error Value: REQUEST not found in &quot;REQUEST/has_key('nofile')&quot;,
at line 6, column 4<br>
<br>
</b>THX<br>
<br>
Marie</html>

--=====================_34449489==_.ALT--