Hi!

CMF 2.2.0-alpha has some getIcon changes based on what I proposed here:
https://mail.zope.org/pipermail/zope-cmf/2009-January/028059.html

Unfortunately the issue is more complicated than I thought and some 
things are now broken in CMF 2.2.0-alpha: The return values of getIcon() 
and icon() are not backwards compatible, breaking e.g. the ZMI icons if 
REQUEST['BASEPATH1'] exists.


There are 4 ways to specify icons:


1.) absolute URL:
-----------------

"http://www.example.org/zope_instance/cmf_instance/icons/foo.png";

CMF 2.1:         -
CMF 2.2.0-alpha: getIcon(), icon()


2.) URL relative to REQUEST['BASEPATH1']:
-----------------------------------------

"cmf_instance/icons/foo.png"

CMF 2.1:         getIcon(), icon()
CMF 2.2.0-alpha: -


3.) URL relative to portal:
---------------------------

"icons/foo.png"

CMF 2.1:         getIcon(relative_to_portal=1), icon(1)
CMF 2.2.0-alpha: -


4.) icon id:
------------

"foo.png"

CMF 2.1:         -
CMF 2.2.0-alpha: getIcon(relative_to_portal=1), icon(1)


Proposal
--------

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?

Cheers,

        Yuppie

_______________________________________________
Zope-CMF maillist  -  Zope-CMF@zope.org
https://mail.zope.org/mailman/listinfo/zope-cmf

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

Reply via email to