We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • discuss.answer
    • 51142
    • 9 Posts
    Thanks for that guys. I'll work on smiley
      • 22840
      • 1,572 Posts
      For it to output TV's you need to use the includeTVs and processTVs

      [[getResources? 
      &parents=`1`
      &tpl=`yourchunk`
      &limit=`5`
      &includeTVs=`1`
      &processTVs=`1`
      ]]


      Then in the chunk something like:

      <p>[[+pagetitle]]</p>
      [[+tvone]], [[+tvtwo]], [[+tvthree]]
        • 51142
        • 9 Posts
        Right. Cool
          • 47401
          • 295 Posts
          Quote from: paulp at Sep 24, 2015, 12:49 PM
          For it to output TV's you need to use the includeTVs and processTVs

          [[getResources? 
          &parents=`1`
          &tpl=`yourchunk`
          &limit=`5`
          &includeTVs=`1`
          &processTVs=`1`
          ]]


          Then in the chunk something like:

          <p>[[+pagetitle]]</p>
          [[+tvone]], [[+tvtwo]], [[+tvthree]]

          when you include TV's you can specify the name of the TV for simplicity in a comma separating list rather than using the ID of the TV.
          • @comp_nerd26 You are thinking of pdoResources, which takes a list of TV names in its &incudeTVs property. With getResources, &includeTVs is a Boolean, and by default will include all TVs if set to 1. There is a separate property, &includeTVList, to take a list of TVs to include.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 47401
              • 295 Posts
              Quote from: sottwell at Sep 24, 2015, 04:16 PM
              @comp_nerd26 You are thinking of pdoResources, which takes a list of TV names in its &incudeTVs property. With getResources, &includeTVs is a Boolean, and by default will include all TVs if set to 1. There is a separate property, &includeTVList, to take a list of TVs to include.

              ok thanks for correcting me smiley
              • That bit me a couple of times before I could remember the difference!

                Another difference between getResources and pdoResources is that &parents=`0` won't be limited to the top level resources in pdoResources, using 0 will use all resources in the Tree as parents. To limit to the top level only, use &parents=`+0`
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org