Re: [Zope-CMF] CMF 2.2.0-alpha: getIcon
Hi! Charlie Clark wrote: > Am 17.11.2009, 14:41 Uhr, schrieb yuppie : > >> 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. > > now that I have my first project working on buildout I can see the impact > of your changes! No icons in the ZMI or in folder_contents. But simply > turning the content_type.png into a string:${portal_url}/content_type.png > does the trick! The content_icon property ('Icon' in the ZMI) is obsolete and should be empty right now. I still have to work on removing it completely. The icon_expr property ('Icon (Expression)' in the ZMI) should have the string:${portal_url}/ prefix. There is an upgrade step available that moves the icon setting to icon_expr and adds the prefix. 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
Re: [Zope-CMF] CMF 2.2.0-alpha: getIcon
Am 17.11.2009, 14:41 Uhr, schrieb yuppie : > 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. Hi Yuppie, now that I have my first project working on buildout I can see the impact of your changes! No icons in the ZMI or in folder_contents. But simply turning the content_type.png into a string:${portal_url}/content_type.png does the trick! Charlie -- Charlie Clark Helmholtzstr. 20 Düsseldorf D- 40215 Tel: +49-211-938-5360 GSM: +49-178-782-6226 ___ 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
Re: [Zope-CMF] CMF 2.2.0-alpha: getIcon
Am 17.11.2009, 14:41 Uhr, schrieb yuppie : > 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. Right. > 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. Okay. Charlie -- Charlie Clark Helmholtzstr. 20 Düsseldorf D- 40215 Tel: +49-211-938-5360 GSM: +49-178-782-6226 ___ 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
Re: [Zope-CMF] CMF 2.2.0-alpha: getIcon
Hi! Charlie Clark wrote: > Am 16.11.2009, 18:24 Uhr, schrieb yuppie : > >> 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. 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
Re: [Zope-CMF] CMF 2.2.0-alpha: getIcon
Am 16.11.2009, 18:24 Uhr, schrieb yuppie : > 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? Charlie -- Charlie Clark Helmholtzstr. 20 Düsseldorf D- 40215 Tel: +49-211-938-5360 GSM: +49-178-782-6226 ___ 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
Re: [Zope-CMF] CMF 2.2.0-alpha: getIcon
Hi. On Mon, Nov 16, 2009 at 6:24 PM, yuppie wrote: > 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: Oh dear :-( > 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. Sounds reasonable. I was hoping we could get away with a new method but it seems I failed. Hanno ___ 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