[Zope3-Users] Re: content type name

Tom Dossis td at yoma.com.au
Wed Dec 1 11:06:03 EST 2004


> 
> I see what you mean now. Here's something you could do (and somethign we 
> could look into for Zope 3 in general):
> 
> Content type interfaces are registered as named utilities providing 
> IContentType (IContentType is a marker interface for IInterface, the 
> interface that describes interfaces). By default, the name by which they 
> are registered is their dotted name (e.g. 'foobar.interfaces.IFoobar'). 
> That by itself is a string that might be presentable to users (but 
> really isn't).
> 
> So instead of falling back to the id, one could register the content 
> types with more useful names, e.g. IFile as 'File' and IFolder as 
> 'Folder'. The current <interface /> ZCML directive doesn't do that yet, 
> it'd have to be extended or replaced with a custom one, maybe one that 
> already does the content type automation:
> 
>   <foobar:contentType
>       interface="foobar.interfaces.IFooBar"
>       name="A foobar"
>       />
> 
> Note that the 'name' parameter here should be a message id so that you 
> get to translate it right away. If you need to know what to do, look at 
> zope.app.component.metaconfigure.interface and 
> zope.app.component.interface.provideInterface...
> 

In plain-speak: For now, I can setup my own register of content type 
names for all content, both included and external to my application in a 
configure.zcml file.

Thanks
-Tom


More information about the Zope3-users mailing list