Chris Withers wrote:

Garry Saddington wrote:

<select name="groupabbrev">
<dtml-in getpastoralgroups>
<option value="<dtml-var thisgroupabbrev>" <dtml-if expr="groupabbrev==_.str(thisgroupabbrev)"> selected</dtml-if> ><dtml-var thisgroupabbrev></option>

And just for comparison, here's the ZPT:

<select name="groupabbrev"
        tal:define="abbrev context/groupabbrev">
  <tal:i repeat="group context/getpastoralgroups"
  <option tal:define="thisAbbrev group/thisgroupabbrev"
          tal:attributes="value thisAbbrev;
                          selected python:abbrev==thisAbbrev"

Stop using DTML ;-)


This code does not work;-). If I always work in the ZMI and do not collaborate with designers on database web applications where the data is more important than the presentation, can you give me a good reason for not using DTML. I find DTML more intuitive than ZPT and once you get the hang of the namespace magic thing it is not that bad. The ZPT code above seems to me more complex and it has defined two new variables, whereas the DTML only has two variables
and a string conversion.
ps. I would use ZPT if I could see a valid reason to do so.

Zope maillist  -
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to