Charlie Clark wrote:
> Am 16.11.2009, 18:24 Uhr, schrieb yuppie <y.2...@wcm-solutions.de>:
>> In CMF we always need the absolute URL. Since getIcon() and icon()
>> already have a different meaning and something like
>> getIcon(absolute=True) looks too complicated for the default, I propose
>> to add a new method: getIconURL()
>> getIcon() and icon() should get the same behavior as they had in CMF 2.1.
>> Any thoughts?
> getIconURL() would work for me. I'm not sure if I understand your e-mail  
> correctly but we shouldn't be keeping four different ways of accessing the  
> icon. Are any of them to be marked as to be deprecated?

AFAICS we need 2 of them in DynamicType:

icon() is part of OFS.interfaces.IItem and should return the URL 
relative to BASEPATH1. This is required to show the icons correctly in 
the ZMI.

getIconURL() should become part of IDynamicType and return the absolute 
URL. This is the only version we need in CMF.

getIcon() is an alias of icon() and could become deprecated. I don't 
know if it's worth the effort to mark the 'relative_to_portal' argument 
of icon() as well as deprecated.

I already started implementing these changes.



Zope-CMF maillist  -  Zope-CMF@zope.org

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests

Reply via email to