[Zope] Re: [Zope-CMF] Adding acquisition containers to a CMF object.

Dieter Maurer dieter@handshake.de
Sun, 1 Jul 2001 22:30:59 +0200 (CEST)


Kent Polk writes:
 > Dieter Maurer wrote:
 > > Maybe, you need to describe in more detail what you want.
 > 
 > I need to provide essentially the same acquisition behavior that
 > one would get by providing a folder name in the URL path....

I assume, you want to add the folder after your product instance.
Then, you can give your product the following method:

      def __bobo_traverse__(self,request,entry):
        inserted_folder= self.inserted_folder # insert your name
	entry= getattr(inserted_folder,entry)
	return entry

This builds the same acquisition structure as would:

     *path-to-your-product-instance*/inserted_folder/entry

However, 'PARENTS' and all URL/BASE variables would be
as if the "inserted_folder" were not there.


Dieter