[Zope3-Users] How to get the icon for a content item.

Shane Hathaway shane at hathawaymix.org
Wed Dec 1 13:07:59 EST 2004


On Thu, 2 Dec 2004, Tom Dossis wrote:

> Stephan Richter wrote:
>> Well, you should only need the icon when you are in a view and a view 
>> always has access to the request: self.request. It does not make sense to 
>> look up the icon outside of view code.
>
> To explain why: as described in my other message, my application ui is a gui, 
> not a browser - I don't have a browser view.  Even if I develop my own gui 
> presentation/views I would still like to display an icon for "all" content. 
> For content external to my application, I could try obtain the icon described 
> in the browser directive.

I suspect ZCML will need to change a bit to support UIs other than web 
browsers.  Icons are one good example of something that isn't specific to 
web browsers, but the ZCML throughout Zope 3 currently assumes they are. 
It seems like the "zope" namespace ought to have an "icon" directive and 
the new zope:icon directive should have an optional "type" attribute.  If 
the "type" attribute is not provided, the icon should be registered for 
any request type.

I also noticed there is currently no support for multiple icon sizes. 
That's important for GUIs and pretty browser UIs.

Shane


More information about the Zope3-users mailing list