We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 44593
    • 2 Posts
    Ok so I use MODX Revolution 2.2.8-pl, and I have installed the getResources Snippet from the Package Manager but when I try to use it nothing gets outputed.

    Here's a proof :


    Here is my getResources call :
    [[getResources? &parents='4' &showHidden='1']]


    This call is inside a chunk that is called inside the template.
    The fourth page has children as you can see on the screenshot and they are all published.

    Exactly nothing comes out of it, what have I done wrong ? Thank you very much
      • 36996
      • 211 Posts
      You need a tpl chunk to display each result

      [[getResources? &parents='4' &showHidden='1' &tpl=`myRowTpl`]]
      
        • 37042
        • 384 Posts
        And make sure you're using back ticks in your call. Looks like you are using apostrophes.
          ...
          • 44593
          • 2 Posts
          yeah but without a tpl I should recieve an array with every aspects of my ressources but I get nothing sad

          using back ticks did not change a thing sadly.

          [[getResources? &parents=`4` &showHidden=`1`]]
            • 3749
            • 24,544 Posts
            Are you sure Resource 4 is published and has children?

            Is that resource protected by any ACL permission entries?
              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
              • 10208 ☆ A M B ☆
              • 1,780 Posts
              [[!getResources? &parents=`4` &showHidden=`1`]]


              Try uncached? getResources won't work without a tpl specified, as you noted earlier an array will show though.
                Frogabog- MODX Websites in Portland Oregon
                "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
                Having server issues? These guys have MODX Hosting perfected - SkyToaster
                • 36924 ☆ A M B ☆
                • 298 Posts
                I had similar similar experience about two months ago. The biggest pain was it started happening just as I was about concluding the project (after 2 months of work). I think the snippets nees to be revisited, perhaps the last release killed the brilliance it use to be.

                That experience made run to Drupal to recover, though I lost client confidence for extending a two months plan to five motnhs
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  You might want to try the new pdoTools, which contains a snippet pdoResources. It's a drop-in replacement for getResources that uses different methods of processing, with a considerable improvement in speed.

                  https://forums.modx.com/thread/85454/pdoresources-replacement-for-getresources
                    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