[Zope-CMF] Re: Metatype() standard?
Marc Lindahl
marc at bowery.com
Wed Mar 3 17:04:45 EST 2004
Hi Tres,
Thanks for the quick reply... important followups:
On Wednesday, March 3, 2004, at 03:38 PM, Tres Seaver wrote:
> 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.
OK, so how does the id of the type object relate to meta_type as used
in products? Are those two meant to be matched/compared?
Also, am I correct in stating that getPortalType returns an immutable
identification of the type, while Type/Title should be used only for
display (human readable) purposes?
>
> 'Metatype()' is a fossil;
OK... can someone notate that in the source?
> 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'.
...and by chance, this is what CMFRating is doing. OK, so I guess that
means listContentTypes is depreciated too? So what should one use, to
get a list of types to compare to getPortalType()?
Thanks,
Marc
More information about the Zope-CMF
mailing list