[Zope] ZPT: ready for prime time?

Chris Withers chrisw@nipltd.com
Fri, 22 Jun 2001 14:20:45 +0100


jmr@computing.com wrote:
> 
> > <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>

You're joking right? They're both horrible :-(

I'm sure the second one could be made nicer with a bit mroe PythonScript usage,
if not then I'll stick with DTML, and I'm sure people here can remember how much
I like DTML ;-)

cheers,

Chris