[Zope] ZPT: ready for prime time?

jmr@computing.com jmr@computing.com
Thu, 21 Jun 2001 21:12:35 -0500 (CDT)


[Apologies to those also on the ZPT list -- but this item that came in
today illustrates my point perfectly.]

Which implementation do you like?


> <dtml-call "REQUEST.set('activeTab',REQUEST.get('activeTab',0))">
> <table border="0">
> <tr>
> <dtml-in tabList>
> <dtml-if "_['sequence-index']==activeTab">
> <td align="center" width=97 height=19 background="frontTab.gif"><a href="&dtml-target;">&dtml-label;</a></td>
> <dtml-else>
> <td align="center" width=97 height=19 background="backTab.gif"><a href="&dtml-target;">&dtml-label;</a></td>
> </dtml-if>
> </dtml-in>
> </tr>
> </table>


<table border="0"
        tal:define="activeTab python:request.get('activeTab', 0)">
<tr tal:repeat="tab tabList">
<td align="center" width=97 height=19 background="frontTab.gif"
     tal:define="index repeat/tab/index"
     tal:attributes="background python:test(index==activeTab,
       'frontTab.gif', 'backTab.gif')">
   <a href="/" tal:attributes="href tab/target"
               tal:content="tab/label">Label</a></td>
</tr>
</table>