[Zope] Question regarding acquisition behaviour.
Paul Winkler
pw_lists at slinkp.com
Tue Nov 25 13:37:24 EST 2003
On Tue, Nov 25, 2003 at 01:55:47PM -0400, Alec Munro wrote:
> Thanks to Dylan for the response, and it is generally what I've been
> doing, though I had to get more complicated in most cases.
> The problem with it is that I don't always know the name of the root
> folder of the site I will be implementing this on. So including the root
> folder into the path is not feasible.
> As well, the suggestion for not reusing folder names might work, but I
> really prefer to be able to organize files by type. Otherwise I would
> have many folders that contained well over a hundred files.
> While that is not a technical challenge, it does present a usability one.
>
>
> Based on that, I see two things that could solve my problems, without me
> having to give up organizing with folders. ;)
>
> 1. A form of acquisition that allowed me hard-code as much of the path,
> starting at the right, as I wished. For example:
> container.acquire('HTML/pageX')
You could implement this yourself, possibly as an External Method.
It shouldn't be too tricky. However, zope's acquisition policy is
not pluggable AFAIK, so you'd have to call your method explicitly.
So your expression above would be something like:
container.special_acquire('HTML/pageX')
Or you could implement (or wrap) it with a traversable Python Script,
which would allow you to visit things by path, like:
container/special_acquire/HTML/pageX
> 2. A type of folder that automatically acquired the files of it's
> subfolders. So I could still organize, but as far as acquisition was
> concerned, it would be as if everything was in a single folder.
The CMF SkinsTool does something related to this.
There is also TransparentFolder which may be closer to what you want.
> 2A. Make folder views filterable (perhaps via a drop-down). So I can
> view only page templates, or only python scripts, etc. When navigating
> the tree, you could have icons next to the folder names, that could be
> used to select the views.
That would be a nice, wouldn't it :-)
CMF has filtered folder views, but the ZMI does not.
--
Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's THE APOCRYPHAL PICKLE!
(random hero from isometric.spaceninja.com)
More information about the Zope
mailing list