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:
Is it possible to add ContentCollections directly in the backend (it should create only a div-tag with classes selectet in the inspector).
How can I add the ContentCollection directly into the document, not the main ContentCollection?
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.
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.
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.