[Neos] filtering nodes by subproperty of a node

Samir Rachidi sr at plusb.de
Mon Nov 17 19:33:45 CET 2014


Hi Neos-community,

i have a question regarding TypoScript2, EEL and FlowQuery:

we have got the following NodeTypes (just a sketch for simplicity):

'Vendor.Types:Reference':
  superTypes:
    - 'Vendor.Types:Page'
  ui:
    ...
  properties:
    relatedCategory:
      type: references
      ui:
        label: 'Category'
        reloadIfChanged: TRUE
        inspector:
          group: 'reference'
          editorOptions:
            nodeTypes: ['Vendor.Types:Category']

'Vendor.Types:Category':
  superTypes:
    - 'Vendor.Types:Page'

So, we have a NodeType ":Reference" with a property of type "references" to a NodeType ":Category". Now, I want to fetch all the "Vendor.Types:Reference"-nodes which have the specific "Vendor.Types:Category" as a reference via TypoScript2 inside the prototype of "Vendor.Types:Category". I tried it with following (not working) ts2-code:

prototype(Vendor.Types:Category) {
  references = ${q(site).find('[instanceof Vendor.Types:Category]').filter('[relatedCategory.path = ' + node.path + ']')}
}

So, basically, I need a way to filter through nested property-values in TypoScript2 to implement a list-view for a category. Is this even possible? Or is there another best practice way of implementing document-categories and different category-views?


More information about the Neos mailing list