[Zope-CMF] Re: Metatype() standard?

Tres Seaver tseaver at zope.com
Wed Mar 3 15:38:31 EST 2004

Marc Lindahl wrote:
> I'm crossposting this because I'm interested in feedback - is Metatype() 
> just a vestige of TypesTool or is it intended to be standardized on?  I 
> was investigating this area and found that Type() actually returns the 
> TITLE of the type, not the meta_type, unless there is no title, and also 
> that Type() is supposed to be depreciated.  What's the real story?  
> Anyone know?

'getPortalType()' should return the ID of the type object;  'Type' 
should return its title.  What is deprecated is using 'Type' where what 
you really mean is 'getPortalType', as the two may not always be the same.

'Metatype()' is a fossil;  as far as I know, nothing in the CMF depends 
on it, except as an option to TypesTool.listContentTypes, where 
'by_metatype' indicates that the returned types should be sorted by the 
result of 'Metatype'.

Tres Seaver                                tseaver at zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com

More information about the Zope-CMF mailing list