Thanks! That works perfectly, and teaches me about namespaces. 
I just had to fix '</dtml-else>' (I also do that)::

  <dtml-if sort_key>
    <dtml-if "REQUEST.form.has_key('sort_key')">
      <dtml-call "RESPONSE.setCookie('sort_key',REQUEST.form['sort_key'])">
    <dtml-call "REQUEST.set('sort_key','title')">
    <dtml-call "RESPONSE.setCookie('sort_key','title')">

Here's a shortened version of my own, from Squishdot. Instead
of this::

  <dtml-if "reply_cnt > 1">
    <B>(<dtml-var reply_cnt> comments<dtml-if body_len>, 
    <dtml-var body_len> in body</dtml-if>)</B>
  <dtml-elif reply_cnt> 
    <B>(<dtml-var reply_cnt> comment<dtml-if body_len>, 
    <dtml-var body_len> in body</dtml-if>)</B>  
    <dtml-if body_len>
      <B>(<dtml-var body_len> in body)</B>

I made this::

  <dtml-if body_len>
    <b>(<dtml-if reply_cnt><dtml-var reply_cnt> 
    comment<dtml-if "reply_cnt > 1">s</dtml-if>,
    </dtml-if><dtml-var body_len> in body)</b>
  </dtml-if body_len>

Jean Jordaan       --    technical writer    --
Mosaic Software    --    Zope 2.1.6 on WinNT and W2K

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to