[Zope] How to get URL of folder (name unknown) with a certain property?

Tim Hicks Tim Hicks" <tim.hicks@iname.com
Sun, 27 Aug 2000 22:20:11 +0100


I am trying to figure out how to get hold of the URL (using
absolute_url I presume) of a folder with a property called
"sehs_root_folder" set to "yes".  I do not know what the name of this
folder is, so I am finding it difficult to use the hasattr function,
and I don't have any way of knowing where abouts in the document tree
the folder is (except that it must be a 'parent' folder of the one
that contains the dtml-method that I am running the code from).

Does that make any sense?  I'm finding it difficult to even express my
question, so searching the mailing list archives is proving fruitless.

I'd appreciate any pointers

tim

ps.  The reason I'm trying to do this is to make my site more
portable.  I would like to be able to change servers and/or folder
names on my server without damaging all the links and addresses to
images/files on the site.  As such, everywhere that I have any sort of
link/address on the site, I currently use the following:

<dtml-var path>/address/to/whatever/

<dtml-var path> is a method that resides in the 'root' folder of the
site, and in it, I put the current appropriate path for the site.
However, I would like to make this method automatically figure out the
appropriate path.  Therefore, I gave the 'root folder' a property
called "sehs_root_folder" that I hope to search for.  If you have a
more efficient way of solving my problem, please let me know.


Tim:  tim.hicks@iname.com