Skip to content

Commit

Permalink
fix: getIcon for archetypes
Browse files Browse the repository at this point in the history
  • Loading branch information
Gagaro committed Dec 2, 2015
1 parent 9abfa6c commit ad873f9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ Fixes:
https://github.com/plone/Products.CMFPlone/issues/1226
[fgrcon]

- Also remove deprecated icons for archetypes
[Gagaro]

- Fixed white space pep8 warnings.
[maurits]

Expand Down
12 changes: 10 additions & 2 deletions Products/CMFPlone/CatalogTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,16 @@ def is_default_page(obj):

@indexer(Interface)
def getIcon(obj):
"""Make sure we index icon relative to portal"""
return obj.getIcon(True)
"""
geticon redefined in Plone > 5.0
see https://github.com/plone/Products.CMFPlone/issues/1226
reuse of metadata field,
now used for showing thumbs in content listings etc.
when obj is an image or has a lead image
or has an image field with name 'image': true else false
"""
return bool(getattr(obj.aq_base, 'image', False))


@indexer(Interface)
Expand Down

0 comments on commit ad873f9

Please sign in to comment.