We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32678
    • 290 Posts
    I'm moving a site from Evo to Revo and using getResources to replace a Ditto function. I cannot get the call to render anything. I've poured over the syntax and have tried different combos of params, all to no effect.

    Here's the call:

    [[!getResources? &tpl=`galleryImage` &depth=`1` &sortBy=`menuindex` &sortDir=`ASC` &includeTVs=`1` &includeContent=`1` &processTVs=`1`]]
    

    The galleryImage template pulls in text, image and default (id) fields. I'm a little unclear on the need for the processTVs param in this instance, but have tried the above with and without.

    Here's the galleryImage template:

    <div class="figure">
    
    <h2><a href="[[~[[+tv.id]]]]">[[+tv.galName]]</a></h2>
    
    <a href="[[~[[+tv.id]]]]" onClick="_gaq.push(['_trackEvent', 'Galleries', 'Gallery', '[[+tv.galName]]', true]);"><img src="[[+tv.galThumb:phpthumbof=`&w=300&h=300#[(base_path)]`]]" alt="[[+tv.galAltText]]" /></a>
    
    [[+tv.galDescription]]
    
    </div> <!-- end figure -->


    I'm using XAMPP and Max OS X.

    Thanks for any input. Have been staring at this for a couple hours! [ed. note: wpicotte last edited this post 14 years, 6 months ago.]
      • 3749
      • 24,544 Posts
      We need to see your getResources tag. Maybe you forgot this:

      &includeTVs=`1` &processTVs=`1`




      ---------------------------------------------------------------------------------------------------------------
      PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
      MODX info for everyone: http://bobsguides.com/modx.html
        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
        • 32678
        • 290 Posts
        My bad - I included the call in my post but didn't wrap it in the code tags.
          • 3749
          • 24,544 Posts
          Are the TVs attached to the template used for the page?

          Are there any ACL entries or Form Customization rules restricting access to the TVs?

          Do you see anything at all with "view source"?


          ---------------------------------------------------------------------------------------------------------------
          PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
          MODX info for everyone: http://bobsguides.com/modx.html
            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
            • 32678
            • 290 Posts
            Yes, the tvs are attached and I have saved values into each. Nothing's coming thru - the div included in the template chunk doesn't show up, which is why I posted the code. I figured that even if I had something wrong with the placeholders, that div would at least show. No restrictions, per your question.
              • 19369
              • 1,098 Posts
              Did you install getResources? I know this is a stupid question but on Evolution snippets like Wayfinder and Ditto were pre-installed.

              I have spot two mistakes in your call, but I am not sure if they influence the output. The parameters &sortBy=`menuindex` &sortDir=`ASC` should be lowercase. It is better if you check them here, because sometimes they're slightly different from Ditto
                • 32678
                • 290 Posts
                Thanks. It's a good question. It is installed, though, and working elsewhere on the test site.

                Thanks for the note on the other params. I've used getResource's docs but I totally missed that. I fixed the ones you pointed out but still nothing.

                Any thought on the need for the includeContent or processTVs params? I'm a little unclear on when these should be applied.

                Thanks
                  • 32678
                  • 290 Posts
                  Thanks. It's a good question. It is installed, though, and working elsewhere on the test site.

                  Thanks for the note on the other params. I've used getResource's docs but I totally missed that. I fixed the ones you pointed out but still nothing.

                  Any thought on the need for the includeContent or processTVs params? I'm a little unclear on when these should be applied.

                  Thanks
                    • 19369
                    • 1,098 Posts
                    I have never used includeContent, so I am not sure of what it does. The resources you're trying to show are by any chance hidden in the menu?
                      • 3749
                      • 24,544 Posts
                      &includeContent is only necessary when your Tpl chunk contains this tag:

                      [[+content]]



                      &processTVs is only necessary if the TV's contain tags or @ bindings that need to be processed. If everything you need is in the raw content of the TV, leaving out &processTVs will speed things up.

                      microcipcip's question about the resource being hidden from menus is a good one. Make sure they're published as well.

                      Try putting a space between the opening brackets of the getResources tag. The tag should show up on the page. If not, it's not a problem with getResources.


                      ---------------------------------------------------------------------------------------------------------------
                      PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
                      MODX info for everyone: http://bobsguides.com/modx.html
                        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