Hi All
I am trying to execute a macro only if a condition
is satisified.
The code I am using is:
<div tal:condition="python:request.form['id'] ==
't' | nothing"
metal:use-macro="container/zptmac_memtask/macros/zptmac_taskslist">
List
</div>
<div tal:condition="python:request.form['id'] == 'p'
| nothing"
metal:use-macro="container/zptmac_mempending/macros/zptmac_pendlist">
List
</div>
<div tal:condition="python:request.form['id'] == 'w'
| nothing"
metal:use-macro="container/zptmac_memweek/macros/zptmac_weeklist">
List
</div>
<div tal:condition="python:request.form['id']
== 'a' | nothing"
metal:use-macro="container/zptmac_memall/macros/zptmac_alllist">
List
</div>
Depending on which value is passed with the form
object i want that a particular macro be called.
But as soon as this page is
rendered it shows me all the macros irrespective of whether I am sending any
value for "id".
Is there some way I can check the condition and only show the
required macro.
I m sure someone working on this particular area dealing with
different conditions can help me out.
Best Regards
John Kunchandy
---
Outgoing mail is certified Virus Free.
Checked by AVG
anti-virus system (
http://www.grisoft.com).
Version: 6.0.381 /
Virus Database: 214 - Release Date: 8/2/2002