try something like (untested, but close enough to actually work maybe 8¬) ) <dtml-with "PARENTS[-2]"> <dtml-if "meta-type=='ZClass1'"> # do this </dtml-if> </dtml-with> Phil phil.harris@zope.co.uk ----- Original Message ----- From: "Kevin Howe" <khowe@performance-net.com> To: "ZOPE Mailing List" <zope@zope.org> Sent: 02 April 2000 20:17 Subject: [Zope] referring to previous directories using references? (../, ./, etc)
How do you refer to previous directories in ZOPE?
On a filesystem you would use references:
Current Directory ./ Previous Directory ../
but these don't seem to work with ZOPE.
I have a structure like this:
ZClass1 | --- Folder | --- ZClass2 | --- DTML Method or Document
Sometime ZClass2 is inside ZClass1, and sometimes it's on it's own. I'd
like
to be able to say:
# check if the object two levels up is a ZClass1 instance
<!--#with "../../"--> <!--#if meta_type == "ZClass1"--> # do this <!--#/if--> <!--#/with-->
Anyone know how I can go about this?
kh
_______________________________________________ Zope maillist - Zope@zope.org 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 )