[Zope] Tal HowTo: <dtml-in><dtml-else></dtml-in>

Johan Carlsson [EasyPublisher] johanc@easypublisher.com
Thu, 10 Apr 2003 08:33:02 +0000


Hi,
How do one ascieve the equivilent to:

<dtml-in getRecords>
...
<dtml-else>
Nothing in getRecords
</dtml-if>

Using conditions produce over complicated markup, which I would like to avoid.

<div tal:define="records python:here.getRecords()">
   <div tal:condition="records"
          tal:repeat="record records">
      ...
   </div>
   <div tal:condition="not:records">
     Nothing in getRecords
   </div>
</div>

I guess the answer is no, but I hope there is a smarter way to do this.

Best Regards,
Johan Carlsson


-- 
Easy Publisher Developers Team
Johan Carlsson
johanc@easypublisher.com

Mail:
Birkagatan 9
SE-113 36  Stockholm
Sweden

Phone +46-(0)8-31 24 94
Fax +46-(0)8-673 04 44
Mobil +46-(0)70-558 25 24
http://www.easypublisher.com