Darin Lee writes:
 > Here is the proverbial rub. If I want to *test* for the presence of
 > "navigation_name" so I can print "title_or_id" if it's not defined, Zope
 > simply skips the "navigation_name" property. It's like it always evaluates
 > to false!
 > <dtml-in "objectValues(['Category'])">
 >  <dtml-with sequence-item>
 >  <dtml-if "hasProperty('navigation_name')">
 >   <dtml-var navigation_name>
 > <dtml-else>
 >  <dtml-var title_or_id>
 > </dtml-if>
 > </dtml-with>
 > </dtml-in>
 > 
 > Doesn't work!
I do not yet know the method "hasProperty".

As a short term work around, you may try directly:

<dtml-if navigation_name>
  <dtml-var navigation_name>
<dtml-else>
  <dtml-var title_or_id>
</dtml-if>

This may acquire "navigation_name". Thus, you may restrict
namespace lookup with:

<dtml-with sequence-item only>
<-- code above-->
</dtml-with>


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