Where to configure an icon for a dexterity type in Plone 5.2.6?

Our customer wants different icons for our dexterity types.

None of the following seems to work:

  • neither setting the property icon_expr in the file profiles/default/types/mytype.xml
  • nor setting Icon (Expression) under portal_types/mytype/manage_propertiesForm

How can we configure it?

Icons in 5.x are done with web fonts, you'll have to override the class in your styles/theme https://github.com/plone/plonetheme.barceloneta/blob/2.x/plonetheme/barceloneta/theme/less/contents.plone.less#L27

Plone 6 will make use of icon_expr again with svgs.

But also without theme. It seems that there is no information about icons in the unstyled code.

Does this mean that addon-developers must also deliver a theme?

Looking at collective.easyform you can define some CSS in your addon to place the desired icon for your contenttype:

Glyphicons are included per default, but if you want other Icons you have to ship your icon font. But speaking in CSS you could even place your SVG image as content type icon ...

1 Like

Plone Foundation Code of Conduct