[Zope-CMF] PortalFolders - 2 questions
Joseph Wayne Norton
norton@alum.mit.edu
Fri, 20 Jul 2001 01:27:49 +0900
Hello.
I have 2 questions regarding PortalFolders.
- using FTP - is it possible to specify or turn on/turn off behavior
of whether a normal Zope Folder or a CMF PortalFolder is created
due to a mkdir command? My current understanding is that a Zope
folder will always be created. Documents seem to behave as
expected.
- allowed_content_types - what is the best way to support this
behavior on an instance basis? Currently, this behavior seems to
be supported only on a class basis.
For example, I would like to limit certain PortalFolders to only
allow for "Images" to be added. I can think of 2 ways of doing
this currently.
a. create a new PortalFolder-like python class whose base class is
PortalFolder ... such as PortalImageFolder. Then use the
type_tool to set allowed_content_types only to "Image".
b. after adding a PortalFolder set a property such as
"self.allowed_content_types_on_an_instance_basis = (Image,)"
modify the invokeFactory skin to check for this property hanging
off of each PortalFolderish object and filter based on this
property as well.
thanks,
- joe n.