[Solved] Adding a ContentCollection as a section

Hello community,

I would like to add new ContentCollections on the same hierarchy level of the ContentCollection(main) Node dynamically in the backend.

So far I was only able to add a content node with a child-node of type ContentCollection in the backend. The hierarchy tree is a mess when I use this and the editor will be confused.

So here are my questions:

  1. Is it possible to add ContentCollections directly in the backend (it should create only a div-tag with classes selectet in the inspector).
  2. How can I add the ContentCollection directly into the document, not the main ContentCollection?

Thank you very much.


you can only add elements dynamically to content collections in the backend. That’s where their name comes from.

So if you want the editor to add multiple collections, they need a parent collection at least.

But you can create a content element that inherits from Content and from ContentCollection and prevent adding another level into the structure tree.
Your Fusion prototype could then just inherit from ContentCollection for example.

But when you say the hierarchy is a mess, you must have a specific structure in mind. If you could describe what structure the desired page should have, it would be easier to give further help.

Hi Sebastian,

thanks for the quick answer.

My desired structure would be:

  1. Dokument (page)
    1.1. Contentcollection (First Section)
    1.1.1. Content 1 (text)
    1.1.2. Content 2 (image)

    1.2. ContentCollection (Second Section)
    1.2.1. Content
    1.2.2. Content

In the frontend I want to seperate the sections (different background-color for example). The goal is to give the editor a better overview and representation in the backend.

Hi Lukas,

after helping several people with the issue I wrote a blog post about it with a solution https://mind-the-seb.de/blog/preventing-deep-content-nesting-in-neos-cms

Hope it helps.

And regarding your structure, it shouldn’t be a problem with my suggested approach but you cannot get rid currently of the ContentCollection between “Document” and the first level of variable content.

Hi Sebastian,

this is exactly what I was looking for. I will try it out. Thank you very much.

Great :slight_smile:
Can you mark the topic as [Solved] ?