[Zope3-dev] LocationProxy and breadcrumbs
Garrett Smith
garrett at mojave-corp.com
Thu Oct 9 13:57:49 EDT 2003
I'm trying to implement 'user folders' by way of principal annotations.
I know historically this sort of thing was done using a 'Members'
folder, but this seems less than elegant given the principal
annotations service.
I want users to be able to access their folders using this sort of path:
/@@myfolder/...
I've create a view for ISite and written a traverser that looks for
'index.html' and returns a location proxied Folder whose actual
container is the user's principal annotations.
This works pretty well traversing from top to bottom. However,
breadcrumbs are wrong -- the traversal back up the path leads to the
annotations service, site manager, etc.
I've written my own version of LocationProxy that wraps all of the
children down a traversal so that the current context's parent is within
the wrapped hierarchy and not the persisted hierarchy. This works, but
is fragile given the widespread direct use of '__parent__' throughout
the code.
I don't think this case is unusual - it should be possible, if not easy,
to create alternative paths to objects. I don't see this as a
multi-parent scenario but merely a way to present the same data via
different paths.
I was hoping someone could offer some insights to this. Perhaps I'm
overlooking an existing facility.
-- Garrett
More information about the Zope3-dev
mailing list