modxmodx-revolutionmodx-resources

getResources displays all subdirectories


In modx I have a resource that goes two folders deep. I'm trying to only display the resources in the parent directory (not the resources in its subdirectories). My getResources call is in the parent resource and reads:

[[!getResources? 
    &parents=`[[*id]]` 
    &showHidden=`1` 
    &includeContent=`1` 
    &includeTVs=`1` 
    &processTVs=`1` 
    &tvPrefix=`` 
    &limit=`0` 
    &tpl=`Attractions Section` 
    &sortby=`menuindex` 
    &depth=`1`
]]

As far as I understand it, the depth parameter should control how deep gr goes to display its resources. I've set depth to 0 and 1, and it's still displaying all the resources in the subdirectories. How do I get it to only display the current directory's resources?


Solution

  • Got it. depth=`depth` returns first level of resources below parent ModX Docs.