Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: Users

Re: Zope Digest, Vol 61, Issue 14

 

 

Zope users RSS feed   Index | Next | Previous | View Threaded


yurj at alfa

Jun 26, 2009, 1:05 AM

Post #1 of 1 (317 views)
Permalink
Re: Zope Digest, Vol 61, Issue 14

>
> Hi list
>
> I have 2 templates, in second template I need render a <span> only when the
> first template have defined a variable.
>
> template1:
> <ul tal:define="var1 python:1">
> <li tal:replace="structure conext/template2"></li>
>


<li tal:replace="structure python:context.template2(var1 =var1)"></li>


> <li tal:replace="structure python:conext.template2(var2=1)"></li>
> </ul>
>
> template2:
> <li>
> <input id="x" name="x" value="somevalue">
> <span tal:condition="exists: var1">span2</span>
>

<span tal:condition="exists: options/var1">span2</span>


> <span tal:condition="exists: attr/var1">span2</span>
> <span tal:condition="exists: context/var1">span2</span>
> <span tal:condition="exists: container/var1">span2</span>
> <span tal:condition="exists: options/var2">span3</span>
> </li>
>
> any condition in span not work :(

_______________________________________________
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 )

Zope users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.