Newbie Acquisition Confusion
Hi everyone, I'm setting up a system for reviewing academic journals with a Zope front end. My client has asked me what would be involved to manage multiple journals on the system. It should be dead easy, but Zope's not behaving as I expect it to. Basically, I have the Python logic and ZPT presentation elements split up into folders (called "person", "manuscript", "review", etc.) within the "journal" folder (the root of the whole system). The style elements are in a folder called "skin"; the generic skin items are inside the "journal" folder to provide a default skin. The master page template is inside the skin folder. Also within the "journal" folder will be one or more folders for each journal, let's call them "abc" and "xyz". Each of these have their own SQL database connection and their own "skin" folders, to override the default appearance. It seems to me that the "skin" folder inside "abc" or "xyz" should override the "skin" folder inside the root, for every subfolder of "abc" or "xyz". But it doesn't -- except DIRECTLY inside "abc" or "xyz". http://server/journal/ <-- gets default presentation, as expected http://server/journal/abc <-- gets ABC presentation, as expected http://server/journal/abc/manuscript <-- gets DEFAULT presentation!!! I also tried altering the structure to eliminate the skins folder, making acquisition direct: http://server/journal/cover <-- gets the default cover image http://server/journal/abc/cover <-- gets the ABC cover image http://server/journal/abc/manuscript/cover <-- gets the DEFAULT cover image Am I doing something wrong here, or is this an ORB fault? I'm running Zope 2.6.1 (OpenBSD package zope-2.6.1) , python 2.1.3, openbsd3 Thanks in advance, Murray
Murray Pearson wrote at 2004-2-19 15:31 -0700:
... Also within the "journal" folder will be one or more folders for each journal, let's call them "abc" and "xyz". Each of these have their own SQL database connection and their own "skin" folders, to override the default appearance.
It seems to me that the "skin" folder inside "abc" or "xyz" should override the "skin" folder inside the root, for every subfolder of "abc" or "xyz". But it doesn't -- except DIRECTLY inside "abc" or "xyz".
http://server/journal/ <-- gets default presentation, as expected http://server/journal/abc <-- gets ABC presentation, as expected http://server/journal/abc/manuscript <-- gets DEFAULT presentation!!!
Essential rule for Acquisition: Containment before Context Read the "Name lookup" section of <http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html> for more information about acquisition. The application you describe is best solved with the CMF's SkinsTool. My "SkinnedFolder" is a tiny layer on to of it to make skinning available outside of CMF portals. <http://www.dieter.handshake.de/pyprojects/zope> -- Dieter
participants (2)
-
Dieter Maurer -
Murray Pearson