Which folder has a particular attribute
Hello all, Stuck on this one... Suppose I have the following directory structure - /folderA/folderA1/folderA1a/folderA1a1 For one of the above folders I've defined a property 'rootfolder'. Is there any way I can tell which one of the above folders is the target folder, i.e., contains the property 'rootfolder'? My page may not be located along the above path, but I can acquire the value for 'rootfolder'. Not sure if I'm making sense... TIA. Regards, Samir
It sounds like you're doing stuff that's better left for acquisition. If it really is crucial to do this, I'd use a method called "siteroot" that returns the id of the folder it's in. Sprinkle as many of these around as you need and then anywhere you go, you can acquire the correct value for the name "siteroot". Done. But be aware there's a good chance you're working too hard. Determining where things are physically located is not usually necessary in a strong acquisition-friendly design. HTH, Dylan On Wed, 2003-07-30 at 08:13, Samir Mishra wrote:
Hello all,
Stuck on this one...
Suppose I have the following directory structure -
/folderA/folderA1/folderA1a/folderA1a1
For one of the above folders I've defined a property 'rootfolder'.
Is there any way I can tell which one of the above folders is the target folder, i.e., contains the property 'rootfolder'? My page may not be located along the above path, but I can acquire the value for 'rootfolder'.
Not sure if I'm making sense...
TIA.
Regards, Samir
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
participants (2)
-
Dylan Reinhardt -
Samir Mishra