[Zope] depthfinder

Ethan Fremen mindlace@majordomo.net
Mon, 22 Nov 1999 18:47:55 +0000


Thanks, all!

Here's the final code snippet- it places a "back" link on every page
more than 1 folder down in the site, and changes behavior appropriately
whether it's being rendered in a Document or a Method:

<dtml-if "_.len(PARENTS) > 2">
<dtml-if "meta_type == 'DTML Document'"><a href="<dtml-var
"PARENTS[0].absolute_url()">">
<dtml-else><a href="<dtml-var "PARENTS[1].absolute_url()">"></dtml-if>
back</a></dtml-if>

--
Ethan "mindlace" Fremen
you cannot abdicate responsibility
for your ideology.