[Zope-CMF] [dev] type info: content_icon vs. icon_expr property

yuppie y.2009 at wcm-solutions.de
Thu Jan 22 07:21:17 EST 2009


Hanno Schlichting wrote:
> yuppie wrote:
>> I just noticed this checkin: http://svn.zope.org/?rev=94014&view=rev
>> And I'm a bit confused. What's the plan? Maintaining redundant 
>> information? Using a different icon for the add action? Deprecating 
>> content_icon and migrating everything to icon_expr?
> I would be fine with deprecating content_icon and switching to icon_expr
> instead of maintaining both.

Sounds good to me *if* someone works on the necessary changes before the 
beta release. I consider the current state of your change as 'work in 

> The only place I know where this would be a bit difficult is in
> Products.CMFCore.TypesTool.TypeInformation.getIcon which returns the
> icon name and not the complete URL.

AFAICS TypeInformation.getIcon is only used by DynamicType.getIcon - at 
least in CMF. And by default DynamicType.getIcon returns the complete 
URL. I think code using getIcon(relative_to_portal=1) can be changed and 
'relative_to_portal' can be deprecated. So it doesn't hurt if extracting 
the relative URL becomes more expensive.

Please note that I started using upgradeSteps for CMFDefault. 
.to22.upgrade_type_properties would be a good place for the migration code.

And the default profiles need to be updated as well.



More information about the Zope-CMF mailing list