[Zope3-dev] Navigating between containers (sort of basic ZPT
question).
Luca Manini
manini.luca at tiscali.it
Mon Nov 15 08:37:44 EST 2004
Hi all.
I'm quite new to Zope, my question is probably really 'basic'. I
apologize if this is not the right ML to post to (just tell me a
better one), but I'm interested in Zope 3 ONLY and this seems to be
the only ML devoted to it.
I've read the wonderfull ProgrammerTutorial (from Jim Fulton) [1] and
the Zope-3-for-Zope-2-developers doc. I've also done my home work with
buddydemo. Nevertheless ... my problem is:
1) I've two content classes (User, Group) and corresponding
constrained containers (UserFolder, GroupFolder).
2) I've working 'listing' views for both.
3) I want to be able to jump from one list to the other, for example:
having the 'gid' cell of a user's row being a href to the
corresponding Group view (like ..../users/staff), or to a filtered
list of other users in that group.
I have not found any example of this (very basic and common)
operation: it took me ages to find oput about the @@absolute_url view.
The 'mechanics' I need to learn to do is:
1) managing paths (like getting absolute_url of a context and
splitting joining it);
2) be able to get a container from 'a know location' (may be something
like site_root/users) or from acquisition (the first - or topmost -
container with some interface abowe the current user).
3) how to get (from Python code) an object from an URL.
Then I hope I'll be able to put that in the framework like making an
adapter AllTheUSerInTheSameGroup from IUser to IGroupFolder that uses
a utility FilteredGroupFolderFromGid.
T(alot)IA, Luca
[1] why is page 51 crapped? What's difference is supposed to have with
http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/ShortTutorial/short.pdf?
--
bye, Luca
More information about the Zope3-dev
mailing list