[Zope] Re: index_html always seems to exist

Josef Meile jmeile@hotmail.com
Tue, 27 May 2003 11:17:04 +0200


> I did.
>
http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/Acquisition.stx
> mentions nothing about index_html...
Actually the thing is that if index_html isn't in the current folder, then
zope will search
it in the parent folder till it finds something (that's Acquisition).
Usually all zopes have
this file in the root folder by default, so zope will allways find
something.

As Dylan said, search "objectIds" in the help of your zope. It returns a
list of the files
in the current folder, so you could do something like:

file='index_html'
if not file in context.objectIds():
context.invokeFactory('Member Profile', id=file, title=file)

Regards,
Josef