We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19872
    • 1,078 Posts
    getResources isn't load anything.

    Initially I was able to load all resource info using the debug call.

    [[getResources? &debug=`1`]] [[getResources? &parents=`choose_an_id` &debug=`1`]]


    But then after following a tutorial in the docs getResources.Category Index Page with Thumbnails http://rtfm.modx.com/extras/revo/getresources/getresources.examples/getresources.category-index-page-with-thumbnails and making a few tweaks based on info in the docs — nothing will load.

    I have a TV selector giving the option of loading getResources or not and two chunks. I've also tried putting propsFeatured-docs-thumb directly on my template.



    selector input:
    Show Featured Homes in Grid==[[$propsFeatured-docs-thumb]]


    propsFeatured-docs-thumb
     [[!getResources?
        &parents=`[[*id]]`
        &tpl=`propsFeatured-docs-thumb-tpl`
        &limit=`0`
        &sortdir=`ASC`
        &includeTVs=`1`
        &processTVs=`1`
        &TVprefix=``
        &includeContent=`1`
        &depth=`0`
        &sortby=`menuindex`
        ]]


    and
    propsFeatured-docs-thumb-tpl
    <div class="row">
    <div class="large-12 columns">
      <h2>[[+tv.longtitle]]</h2>
    <p>Is anything loading?</p>
    </div>
    </div>
    [ed. note: mmcgee last edited this post 11 years, 7 months ago.]
      • 30585
      • 833 Posts
      getResources is indeed compatible with MODX 2.3.3

      Which class key is your parent/container using? If you're using extras like Collections, Articles or GridClassKey, you need to add &showHidden=`1` to your call.

      [ed. note: treigh last edited this post 11 years, 7 months ago.]
        A MODx Fanatic
        • 19872
        • 1,078 Posts
        I'm not using any class key. Just trying to get the longtitle of a child resource to appear on the page for now.

        At the moment, I have one parent, one child. Both are published. The child is hidden from menus.

        And just now... I may have found the problem. The sort is by menu index. If the child is hidden from menus, then there's sort of no menu index to sort maybe?
          • 19872
          • 1,078 Posts
          Nope! Deleted the &sort line and still nothing loads. At any rate, it would not be uncommon for children to be hidden from menus, yet one might still want to sort by menu index.

            • 19872
            • 1,078 Posts
            The tutorial said depth should be &depth=`0`. The doc show that the default is &depth=`10`. Neither setting results in content being loaded.

            I added in &showhidden=`1`. Still no content loading.

            No errors in the MODx error log either. I have that text paragraph in the chunk, and since not even that is loading, I'm guessing that getResource cannot even find the chunk to load it.
              • 19872
              • 1,078 Posts
              Yahoo!

              changed the suggested &showhidden=`1` to &showHidden=`1` and at least my paragraph now shows up. However, the tv longtitle is not loading.

              Getting warmer though:)
                • 19872
                • 1,078 Posts
                Even warmer!

                the "tv." as indicated in the MODx docs is not needed in front of the placeholder name.

                Success! Got the longtitle and my paragraph to load.