[Zope] depthfinder
Ethan Fremen
mindlace@majordomo.net
Mon, 22 Nov 1999 17:31:30 +0000
I'm trying to include code in my standard_html_footer that checks to see
if I'm more than 2 folders deep in the site. If so, I want a back
button.
why doesn't this work? It fails if PARENTS[1] evaluates to false.
<dtml-if "PARENTS[1]"><a href="<dtml-var
"PARENTS[1].absolute_url()">">back</a></dtml-if>
last lines of traceback:
File
/usr/local/src/Zope-2.0.0-src/lib/python/DocumentTemplate/DT_Util.py,
line 321, in eval
(Object: PARENTS[1])
File <string>, line 0, in ?
File
/usr/local/src/Zope-2.0.0-src/lib/python/DocumentTemplate/DT_Util.py,
line 156, in careful_getitem
IndexError: list index out of range
(zope 2.0.0), i know about the security issue & will upgrade before
going live.
--
Ethan "mindlace" Fremen
you cannot abdicate responsibility
for your ideology.