Jay, Dylan writes:
 > ...
 > Perhaps another example will prove its uglyness.
 > 
 >  <dtml-if "REQUEST.has_key('some_value') and this().has_key(some_value) and
 > _[some_value] == 'a property value' and
 > AUTHENTICATED_USER.has_role('Manager')">
 >   <a href="a_url">
 >  </dtml-if>
 >   link text
 >  <dtml-if "REQUEST.has_key('some_value') and this().has_key(some_value) and
 > _[some_value] == 'a property value' and
 > AUTHENTICATED_USER.has_role('Manager')">
 >    </a>
 >  <dtml-else>
 >    (no link available)
 >  </dtml-if>
 > 
 > 
 > or
 > 
 > <dtml-if "REQUEST.has_key('some_value') and this().has_key(some_value) and
 > _[some_value] == 'a property value' and
 > AUTHENTICATED_USER.has_role('Manager')">
 >   <a href="a_url">
 > <dtml-always>
 >   link text
 > <dtml-else>
 >   (no link currently available)
 > <dtml-then>
 >   </a>
 > </dtml-if>
 > 
 > Now which looks cleaner?
You could use "dtml-let" to avoid the (admittedly) ugly
repetition of the condition.


Dieter

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

Reply via email to