FlowQuery on a Document/Page Level and it's direct children

Hello again :wink:

I know by now that there are different solutions for what I want, but none of the ones I come up with, would give me/the user the freedom I would like to keep, so let me explain shortly what I am trying to do:

I want a main Page with direct Subpages, being the active Projects, at the same time I want another type of Subpage in that main page containing older Projects. The important part is, that those “main-pages” are suppose to define if a Project is active or not. That way the user can just move the project from one folder to the other and change its state by doing so.

The problem I have got is that I don’t know how to only filter for the active type. The Archive is filtering and working as expected but the active condition doesn’t seem to filter out my Archive Page with all its children. Why?
Btw. I have tried all kinds of FlowQueries but I am not getting the expected results…

I have read in this Forum a couple of times, that .children() and .find() are basically doing the same… For me it would make more sense if either .children() only looks for the direct children while .find() goes down the tree as much as needed, or if there was at least a function like: .directChildren()
Also, looking at the documentation here seems to be an approach the other way around -> .parent() = looking for the direct parent (shouldn’t there be only one?) and .parents() = looking all the way along the tree finding “deeper” parents too. (I haven’t tested its behaviour though…))

prototype(webappcreations.diessbacherbablDe:EightFourList)  < prototype(Neos.Neos:Content) {

    # Fetch Filter-Settings
   @context.queryType = ${q(node).property('projecttype')}

   MyCollection = Neos.Fusion:Collection {
   # get the Active/Archive-Collection by the Folder-Property-Setting
   activeCase = Neos.Fusion:Case {
        activeCondition {
                @position = 'start'
                condition = ${queryType == 'InBearbeitung'}
                //renderer = ${q(site).find('[instanceof webappcreations.diessbacherbablDe:ProjectStorage][projecttype*="InBearbeitung"]').find('[instanceof webappcreations.diessbacherbablDe:ProjectDocument]').get()}
                renderer = ${q(site).children('[instanceof webappcreations.diessbacherbablDe:ProjectStorage]').filter('[projecttype!="Archiv"]').find('[instanceof webappcreations.diessbacherbablDe:ProjectDocument]').get()}
        }

        archiveCondition {
                @position = 'start'
                condition = ${queryType == 'Archiv'}
                renderer = ${q(site).find('[instanceof webappcreations.diessbacherbablDe:ProjectStorageArchive]').filter('[projecttype = Archiv]').find('[instanceof webappcreations.diessbacherbablDe:ProjectDocument]').get()}
        }

    collection = ${q(this.activeCase)}
    itemName = 'node'
    itemRenderer = Neos.Fusion:Template {
            templatePath = 'resource://webappcreations.diessbacherbablDe/Private/Templates/NodeTypes/EightFourListCollection.html'
            node = ${node}      
            imageUri = Neos.Neos:ImageUri {
              asset = ${q(node).property('teaserImage')}
              maximumWidth = 400
              maximumHeight = 200
              @if.teaserImage = ${q(node).property('teaserImage')}
            } 
            nodeUri = NodeUri {
                node = ${q(node).get(0)}
            }
    }

  }
}   

Related Topic but it doesn’t seem to help me:
Filter Current Document

Please help me :slight_smile:

What I will do for now is to use two subpage folders, one for the active and one for the archive…

The active ones will get an extra url part, but besides that everything can stay the same.

Still I am wondering how to properly filter out a subpage-folder and all its children.

Cheers
Robin