We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20364
    • 89 Posts
    This is an odd problem.. I have a getResources call that is working fine in one place, but in another, the output is all off. This is the call:
    [[getResources? &tpl=`module_photo` &includeTVs=`1` &processTVs=`1` &resources=`48`]]

    What it’s doing is outputting "module_photo" three times. The first two are blank (no template variables), the third is correct. I’ve tried tons of variations of the call, double and triple checked the code.. very stumped. Any assistance is much appreciated!
      • 22303 MODX Staff
      • 10,725 Posts
      This is likely because you are not specifying a &parents property so it is using the current Resource as the value and picking up it’s children that perhaps do not have those Template Variables.
        • 20364
        • 89 Posts
        Thanks!

        For anyone else who has this issue, you essentially have to set &parents to equal the same ID(s) as &resources
          • 22303 MODX Staff
          • 10,725 Posts
          Quote from: mr.johnny at Apr 06, 2011, 01:36 PM

          For anyone else who has this issue, you essentially have to set &parents to equal the same ID(s) as &resources
          I think someone said `-1` might work as well, i.e. use an invalid parent id.