[SOLVED] Using a FlowQuery on nodePath with Neos.Neos:ContentCollection

If got a Content element called timeline which has a Neos.Neos:ContentCollection (timelineItmes) with Content elements of a special type called timeObject. Thees timeObjects are spread all over the tree. I’ve managed it to get the items filtered by a category and that they are collected either from timelineItems or from site with:

prototype(vendor.SitePackage:TimeLine) < prototype(Neos.Neos:Content) {
templatePath = 'resource://vendor.SitePackage/Private/Templates/FusionObjects/TimeLine.html'

@context.filterMyCategories = ${q(node).property('filterByCategories')}
@context.myNodes = ${q(node).property('onlySubs') ? node : site}
@context.filterMode = ${q(node).property('filterCombination')}

timelineItems = Neos.Fusion:Loop {
    items = ${q(myNodes).find('[instanceof vendor.SitePackage:TimeObject]').filterByReference('category', [filterMode, filterMyCategories] ).get()}
    itemRenderer = vendor.SitePackage:TimeObject.Short
}

}

This works fine!
But I would like to get the timeObjects inline editable. So as far as I found out, I can not use the Neos.Fusion:* elements. Or would that be possible somehow?

So to stay inline editable I will have to use Neos.Neos:ContentCollection like this:

prototype(vendor.SitePackage:TimeLine) < prototype(Neos.Neos:Content) {
templatePath = 'resource://vendor.SitePackage/Private/Templates/FusionObjects/TimeLine.html'

@context.filterMyCategories = ${q(node).property('filterByCategories')}
@context.myNodes = ${q(node).property('onlySubs') ? node : site}
@context.filterMode = ${q(node).property('filterCombination')}

timelineItems = Neos.Neos:ContentCollection {
    nodePath = 'timelineItems'
    content.iterationName = 'timelineItemsIteration'
    attributes.class = 'itemsWrapper'
}

}

This works fine, but there is no possibility to get the nodes as requested with myNodes, filterMode and filterMyCategories.

How could this problem be managed?

You can of course use the Neos.Fusion:Collection. But your individual elements need a ContentElementWrapping. So you either use ContentComponents or add the wrapping via process.

Hope that helps.

Great!!
That did the trick!
Thank you very much!

Great :slight_smile:

You can then mark the topic as [SOLVED]

I would love to do that, but I can’t see a button or description how this could be done.

Yes sadly we don’t have one yet. But you can edit the title and prefix the text.

:+1: