[Zope] TAL conditional expression

David Bear David.Bear at asu.edu
Mon Sep 8 12:50:39 EDT 2008


many thanks. I suppose I did not understand that a request.form object is
given all objects 'requested' even if they are a macro in a template that is
called by another template, or a fill-slot that is satisfied by another
template.

On 9/5/08, Andreas Jung <lists at zopyx.com> wrote:
>
>
>
> --On 5. September 2008 13:05:23 -0700 David Bear <David.Bear at asu.edu>
> wrote:
>
> I would like to test the value of a field entered on a form in a zpt, but
>> I'm don't know the syntax
>>
>> basically I would like to do something like this
>>
>> <div tal:condition="request/form/fieldA=1"> do this
>>    <p metal:use-macro="here/atemplate/macros/may" />
>> </div>
>>
>
> but this doesn't seem to want to work.
>>
>
> See
>
> <http://www.plope.com/Books/2_7Edition/AdvZPT.stx#2-19>
>
>
>> Also, I would like to be able to use the same request object in both my
>> template and the macro, but my macro doesn's seem to have access to the
>> same request object.
>>
>
> This statement is likely wrong since the 'request' is always available -
> and of course there is only 'request' object over the lifetime of a HTTP
> request.
>
> -aj
>
>
>
> -aj
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>
>
>


-- 
David Bear
College of Public Programs at ASU
602-464-0424
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20080908/0ba5e334/attachment.html 


More information about the Zope mailing list