acquisition - Good ways to acquire resources from parent folders in Plone? -


i have plone (4.0.1) site requires changes in layout depending on folder. imagine structure like:

university > faculty > institute a1 > person a11                                       > person a12                        > institute a2 > person a21 ... 

now if put needed resources (custom css file, images, etc.) zodb, pages person a11 automatically pick fac-image.gif located in faculty folder.

however, avoid confusion, not want expose fac-image.gif users. (this part of framework they're not supposed touch anyway.)

if register resource, can access stuff ++resource++theme.images/path, no acquisition parents taking place, ++resource++theme.images/facultya/institutea1/fac-image.gif won't find image. worse, have separate directory structure maintain now.

what i'm doing hand-rolling "best effort" traversal process through file system directory view try go down path, stay if subdirectory doesn't exist (i.e. resource tree doesn't have subdirectory person a11; instead of yelling 404 stay @ institute a1), , try acquire up. trickery involved portal_factory , views, , i'm pretty sure i've missed more.

so: surely isn't way 1 supposed it, is?

you can inspirate collective.phantasy implements use case plone3 (change l&f folder container).


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -