We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9714
    • 38 Posts
    Hey guys,
    I know that of getResources 1.4.0-pl OpenGeek has added the feature to limit which tv's get called for better performance. Am a little confuse on the documentation. How would I go about calling only the selected template variables I want?

    Am using this getPage snippet:
    [[!getPage?
     &elementClass=`modSnippet`
     &element=`getResources`
     &parents=`[[*id]]`
     &limit=`10`
     &includeTVs=`1`
     &processTVs=`1`
     &includeContent=`1`
     &showHidden=`1`
     &sortdir=`ASC`
     &tpl=`gd-list`
    ]]


    I thought it was called thought IncludeTVs and processTVs, like so:
     &includeTVs=`tv-name, tv-name2, tv-name3`
     &processTVs=`tv-name, tv-name2, tv-name3`


    But I guess am wrong. [ed. note: FireDart last edited this post 15 years ago.]
      -FireDart
      • 3749
      • 24,544 Posts
      I think you want this (IIRC):

      &includeTVs=`1`
      &processTVs=`1` // not necessary if you can use the raw content of all TVs
      &tvList=`tv1,tv2,tv3`
      &tvPrefix=``   // or whatever
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 22303 MODX Staff
        • 10,725 Posts
        Quote from: BobRay at Sep 29, 2011, 12:03 AM
        I think you want this (IIRC):

        &includeTVs=`1`
        &processTVs=`1` // not necessary if you can use the raw content of all TVs
        &tvList=`tv1,tv2,tv3`
        &tvPrefix=``   // or whatever

        Almost...

        &includeTVs=`1`
        &processTVs=`1` // not necessary if you can use the raw content of all TVs
        &includeTVList=`tv1,tv2,tv3` // only includes these TVs
        &processTVList=`tv2` // only process tv2 (must be in includeTVList if specified)
        &tvPrefix=``   // or whatever
          • 9714
          • 38 Posts
          Ahhh, I can't believe how much faster the load time is.

          However it seems that &processTVList is not needed to process the tv's.

          Not sure if this is a bug.

          Input Option
          - ListBox (Multi-Select)
          Output Option
          - Delimiter " " (Using a space)
            -FireDart
            • 3749
            • 24,544 Posts
            @FireDart: It depends on how you're using them. If you're just using the selected options, you might not need to process them. Be sure you test one with multiple values selected.

            @OpenGeek: Thanks for the correction. The new ones are not here yet and I was too lazy to look at the code wink http://rtfm.modx.com/display/ADDON/getResources#getResources-SelectionProperties
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 22303 MODX Staff
              • 10,725 Posts
              Quote from: FireDart at Sep 29, 2011, 02:09 PM

              However it seems that &processTVList is not needed to process the tv's.

              Not sure if this is a bug.
              This is not a bug; if you specify &processTVs=`1`, all the "included" TVs are processed, unless you limit which TVs are processed using &processTVList=`tv1,tv2`.
                • 9714
                • 38 Posts
                Thanks guys for all your help.
                  -FireDart