does someone can give me a blueprint / example for creating a custom ContentCollection which I can fill with some query content?
What I need in short: How can I create a ContentCollection with custom content which is not bound to a nodePath, can hold every kind of content node and is simply rendered by “{content.sidebar2 → f:format.raw()}”?
Longer explanation for what I’m searching for:
The main goal is to create an inherited sidebar which should shown the contents of the parent pages.
I found a few links here (although they are quite old):
It seems not to be very difficult. Use a ContentCollection and fill it with content via query. Both links are showing a few examples for different cases. But maybe they are to old?
Whatever I’m trying to put into the “collection” - it’s simply ignored. I always got a copy of the given sidebar of the current node (because the nodePath “sidebar” is rendered again).
There I can see ContentCollections without a nodePath, using @context.
Additional you say “has to be correct or you don’t set it”. This is what I assumed, that I can omit the nodePath to have the full control whatever I want to do with a ContentCollection. But if I do, I got the error:
No content collection of type Neos.Neos:ContentCollection could be found in the current node (/sites/my-site/node-wwr6eqq34u00d/node-bg9pwyvhxcvuy) or at the path "to-be-set-by-user". You might want to adjust your node type configuration and create the missing child node through the...
Means:
This is working for me, without the collection part. I got the content of the nodePath of the “Homepage”: