[Zope3-Users] Re: content type name
Philipp von Weitershausen
philipp at weitershausen.de
Wed Dec 1 09:12:01 EST 2004
Tom Dossis wrote:
>
> How can I associate names for my content types, e.g. 'Custom Document',
> 'My Image Type', etc. ?
As Stephan said, you really don't. Content types in Zope are interfaces
because those are more meaningful than simple strings. Whenever you need
a name to be presented to a user, you use menu entries etc.
> Also, is there a standard way to do this for standard content, e.g.
> "Folder", "DTML Page", etc. ?
>
> This would correspond to portal_type/meta_type under Zope2.
The content type interfaces correspond to portal_type/meta_type. Strings
(really, unicode string) are only necessary for user presentation. This
is covered by menu entries most of the time. If you have other use
cases, feel free to present them here and we'll discuss them.
> It appears it could defined via ZCML zope/content/factory/title. Is
> this the case? How can I retrieve this?
What you probably mean is:
<content class="foobar.FooBar">
<factory
id="foobar.FooBarFactory"
title="Create foobars"
/>
</content>
This registers a factory component and is in *no* correspondance of the
content type that might or might not be implemented by the class
foobar.FooBar.
Philipp
More information about the Zope3-users
mailing list