We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10638
    • 57 Posts
    Hi is it possible to force getResources to descend into a parent resource in order to fetch child resources that also match the filter?

    eg: Let’s say I want to fetch resources with the TV value of ’apple’.

    parent (TV fruit = apple)
    - child 01 (TV fruit = banana)
    - child 02 (TV fruit = banana)
    - child 03 (TV fruit = apple)

    This appears to return the parent, and all child resources (including the banana resources).

    Another example is fetching all ’banana’ resources. Because the parent resource is an ’apple’, getResources seems to ignore all of its children.

    What I am actually trying to do is to filter resources based on a date TV. I tried using the Archivist snippet but did not get very far. :S

    Thanks for any pointers! laugh laugh

    edit: example was completely wrong, SORRY GUYS! smiley
      • 11076
      • 159 Posts
      I think you can use the `where` property with publishedon/createdon to refine the retrieved resources to that criteria.

      http://rtfm.modx.com/display/ADDON/getResources#getResources-SelectionProperties
      http://rtfm.modx.com/display/ADDON/getResources#getResources-Examples
        Michael Shraibman( gOmp)  | Freelance Design & Development | wink  impossible is nothing...