1

I have the following getResources code on a page:

[[!getResources? 
                &resources=`57,77`
                &depth=`1`
                &tpl=`customersListTPL` 
                &limit=`99`  
                &sortdir=`ASC`  
                &includeTVs=`1`  
                &processTVs=`1`
                &includeContent=`1`
                &showHidden=`1`
                &depth=`0`  
                &sortby=`menuindex`  
            ]]

I want it to only display data from the resources 57 and 77, but it is also displaying child resources from the resource this is on too.

Anyway I can stop that?

MeltingDog
  • 14,310
  • 43
  • 165
  • 295

1 Answers1

5

For some design-reason getResources will allways mix results from the defined parents (explicit or implicit) if the &parents config is not set.

If you only want to use the defined &resources you have to explicitly disable the parents by using:

&parents=`-1`

For reference: That's not the only oddity of getResources, the limit is preset to 5 and the sort order is createdon=DESC (for example).


Manual: https://rtfm.modx.com/extras/revo/getresources#getResources-Examples

Yoshi
  • 54,081
  • 14
  • 89
  • 103