Hi @BenjaminK,
Nothing changes with this edit unfortunately, but I got some good feedback: I tried the same structure (as in 11th post) in a neos.demo site and it works perfectly as I’d want it in my site. So, I guess I am missing something in my own build.
Weird thing is, on the neos.demo site the heroText displays as custom input, but on my site it displays as ContentCollection under the “Structure” sidebar.
I’ll dig around to see what I’m doing wrong. But in the meanwhile, is there anything else I should run when editing fusion / yaml files ? I figured I have to run flow node:repair
when changing the nodeTypes.yaml, is there anything similar thing that could be reading old type from heroText and wrongly treats it as a contentCollection ? Or maybe I am missing something from Neos.Demo ? I don’t use Neos.Demo on my own site.
UPDATE: Woohoo !! I got it working after a cache flush, damn, some of these caches shouldn’t be there in development environment … Anyway, thanks a lot once again @BenjaminK, I’ll now try to implement this with my custom content prototype.
UPDATE 2: Nice, works like a charm ! So, with my prototype now looking like this :
prototype(Vendor.Site:Content) < prototype(Neos.Fusion:Collection) {
itemName = 'node'
nodePath = '-filled-by-the-user'
collection = ${q(node).children(this.nodePath)}
itemRenderer = Neos.Neos:ContentCase
@cache {
mode = 'cached'
entryIdentifier {
collection = ${node}
}
entryTags {
1 = ${'DescendantOf_' + node.identifier}
2 = ${'Node_' + node.identifier}
}
maximumLifetime = ${q(node).context({'invisibleContentShown': true}).children().cacheLifetime()}
}
}
I can render content as well as custom content (originating from Neos.Neos:Content) like my HeroText, like so:
heroText = Vendor.Site:Content {
nodePath = 'heroText'
}
Maybe later I’ll look for a way to make this even more magic and load the variable name directly from the nodeTypes.yaml so that I don’t have to define all children nodes both in yaml and fusion, but I’ll leave it like this for now until I’m more familiar with the best practices
Cheers, I guess I can mark this as solved (eh, no idea how to do that though, just edit the title ?) !