[Zope] dtml-with and only
Barry A. Warsaw
bwarsaw@python.org
Wed, 3 Nov 1999 17:34:29 -0500 (EST)
Thanks for the suggestion and explanation guys. Just to follow up,
Michel's suggestion to use <dtml-with aq_explicit> to turn off
acquisition did not work. Loren's suggestion to test on
"hasProperty('nickname')" did the trick nicely. For completeness,
here's the DTML for my current Breadcrumbs DTML method.
-Barry
-------------------- snip snip --------------------
<!-- start Breadcrumbs -->
<dtml-call "REQUEST.set('rev', [])">
<dtml-in PARENTS skip_unauthorized>
<dtml-let item=sequence-item>
<dtml-call "rev.insert(0, item)">
</dtml-let>
</dtml-in>
<dtml-in rev>
<dtml-with sequence-item>
<a href="<dtml-var absolute_url>">
<dtml-if "hasProperty('nickname')"><dtml-var nickname><dtml-else><dtml-var title_or_id></dtml-if></a>
</dtml-with>
<dtml-unless sequence-end> >
</dtml-unless>
</dtml-in>
<!-- end Breadcrumbs -->