Hi there,
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?
Something like this does not work:
sidebar2 = Neos.Neos:ContentCollection {
nodePath = 'sidebar'
collection = ${q(site).children('sidebar').children().get()}
}
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).
What I’m missing?
I’m using NEOS 5.3.
Kind regards,
Maximilian