Neos-ui: Labels and icons in ContentCollections

Created on 21 May 2019  路  8Comments  路  Source: neos/neos-ui

At the moment, it is not possible to define own icon and/or label for Neos.Neos:ContentCollection.

Bug UI & UX

All 8 comments

Ok after a call with Jon it is now clearer what he wants to achieve.

The Problem is that you can always define icons and labels for nodes or new node types, but not for the Neos.Neos:ContentCollection itself.

Other_elements_-_Features_-_Neos_Demo_Site_-_Vivaldi

So it is more or less a feature to resolve this inconsistency.
It would be better to have own labels sometimes and configure own icons than the folder.

Before I dive deeper into the rendering of the content tree.
Is it ok to adjust the icon and label like that for the content collections? Or any other suggestions?

'Neos.NodeTypes:Page':
  childNodes:
    'main':
      ui:
        icon: 'icon-star'
        label: 'Main'
    'teaser':
      type: 'Neos.Neos:ContentCollection'
      ui:
        icon: 'icon-star'
        label: 'Teaser'
      constraints:
        nodeTypes:
          '*': FALSE
          'Neos.NodeTypes:Headline': TRUE
          'Neos.NodeTypes:Text': TRUE
          'Neos.NodeTypes:Image': TRUE

I am still searching the piece of code where the node label is generated, but as it comes from a flow query it happens not in the UI package. But will try to investigate that.

Shouldn't you override it like ...?

'Neos.Neos:ContentCollection':
  ui:
    icon: 'icon-star'

And if you need different "types" of ContentCollections, just make your own and inherit from Neos.Neos:ContentCollection ...?

What @danielkestler suggest is correct, therefore I'm closing this issue. Please re-open if I'm wrong.

Please re-open it. That's exactly the point. It is not possible to set the label or the icon. For example, this don't work as expected:

'Foo.Bar:ContentCollection':
  superType:
    'Neos.Neos:ContentCollection': true
  ui:
    label: Slides
    icon: 'fas fa-exchange-alt'

Thank you for the sample config, now it would be much easier to reproduce it.

I'll take this one

@jonnitto I just tested both with 2.x and with 5.0, and I get the expected behaviour with your code example:

image

Was this page helpful?
0 / 5 - 0 ratings