Hedley Roos wrote:
It sounds as though you have subclassed BaseFolder to create your own
folderish type. Set allowed_content_types to = ('Topic',) in the class
declaration. Restart. Reinstall. It should work.
This works to add Topic (Collection in v3) object to the list of addable
types. I would like to either add one programmatically inside this
Folder-ish type when it is created, or at least limit the number that can be
created to only one. But more importantly, I'd like to make the Topic the
default view once it exists (or, again, at least make it possible to make
the Topic view the default view). Simply making Topics addable doesn't seem
to do this.
To make the topic the default view only once it exists you can use an
old Zope trick: call the Topic object index_html. In fact, only the id
(aka Short Name) has to be index_html. The Title can be whatever you
want.
Note that some people may frown on this approach :)
Indeed. ;-) See
http://dev.plone.org/collective/browser/PressRoom/trunk/content/PressRoom.py
for an example of code that creates a Folder inside a folderish type,
then creates a Topic set as the default page for the folder, using
obj.setDefaultPage.
:jon
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers