[Zope] depthfinder

Bill Anderson bill.anderson@libc.org
Mon, 22 Nov 1999 18:58:31 -0700


Ethan Fremen wrote:
> 
> 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>


Funny thing, I was working on this myself lastnight :-)

I wound up using :
<dtml-if URL2>
    ....
</dtml-if>

I am using it to generate a list of folders and their subfolders ;-)

(Yes, there will be a neat little howto for it soon (including your code
above, IYDM) :-)

Bill

-- 
"They laughed at Columbus, they laughed at Fulton, they laughed at the
Wright brothers.  But they also laughed at Bozo the Clown." -- Carl
Sagan