[Zope-CMF] [RFC] Type mess and allowed_content_types

Florent Guillaume fg@nuxeo.com
Thu, 4 Jul 2002 10:01:06 +0000 (UTC)


I'd like to clean up the Type mess now. That means, use ti.getId() or
portal_type everywhere program logic is involved.

The only real impact I see is that allowed_content_types in the
TypeInformation (TI) objects currently contain a ti.Type() where we want
it to contain ti.getId().

There will be a problem when upgrading for those who have non-empty
title. When upgrading, those types won't be preselected in the "Allowed
content types" property of the TI of their container types.

But because this non-empty title poses problems anyway for filtering
(currently it's broken), those that have any probably also have
filtering disabled, so I think it's ok.

So a portal_type index would be used to find stuff, and the various
scripts (recent_news, news_box) would use it. Type would be deprecated
for all program logic. TI.Type would become TI.Title. DublinCore's Type
would call TI.Title.

Anyone has a problem with this change, or comments ?

Florent
-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:fg@nuxeo.com