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 1, 2015
1 parent 9abfa6c commit 683970b
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Products/CMFPlone/CatalogTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,18 @@ 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
"""
if obj.aq_base.image:
return True
return False


@indexer(Interface)
Expand Down

0 comments on commit 683970b

Please sign in to comment.