Dieter Maurer wrote:
> 
>  * Access to "/": "PARENTS[-1]"
>  * Existence check: "_.hasattr(object,what)"
>      NOTE, that this is the sloppy part.
> 
>       - "_.hasattr" will return true, if "object" has
>         attribute "what" (that is what we want)
>         *OR* when it has acquired such an attribute
>         (we do *NOT* want that here).
> 
>         What we would need is a DTML accessible version
>         of "aq_base". This is trivially handled by
>         an external method.

Can you do this with the following in DTML?

  <dtml-with "PARENTS[-1]" only>
    <dtml-if "_.hasattr(object, what)">
        ...stuff...
    </dtml-if>
  </dtml-with>

Not tested, but it looks right to me.

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net

_______________________________________________
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