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

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"
          tal:content="thisAbbrev"/>
</select>

Stop using DTML ;-)

Chris

--
Simplistix - Content Management, Zope & Python Consulting
           - http://www.simplistix.co.uk

_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to