We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40349
    • 26 Posts
    Wild Eagle Design Reply #1, 14 years ago
    have been building a new website in Modx and just installed getResources.

    The problem I'm having is I can't get it to work. I can't even get the array to work.

    Here is what I have don so far. I have created a simple template called "test_template."

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <base href="[[++site_url]]" />
    
    </head>
    <body>
    
    [[!getResources? &showHidden=`1`]]
    
    </body>
    </html>
    


    From there I created a resource page and called it "get-resources-test." I also set the template to "test_template." When I test the page it comes back blank.

    I have tried uninstalling and re-installing getResources. When it installs it says "successful."

    Here is the link http://www.completeshs.com/resident-form/get-resources-test.html
    Any ideas what is wrong?
      Wild Eagle Design

      www.wildeagledesign.com
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      By default getResources will list all resources that are children of the current resource (the one being viewed). If you create a resource, then create a child, viewing the child won't show anything, since the child has no children. You'll only see results if viewing the parent resource.
        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
        • 40349
        • 26 Posts
        Wild Eagle Design Reply #3, 14 years ago
        Your right. Thank you sottwell! My original plan is not going to work. Back to the chalk board. wink
          Wild Eagle Design

          www.wildeagledesign.com
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Have you considered using
          &parents=`[[*parent]]`


          or even using the UltimateParent snippet as the parents property value?

          You could also use a TV with @INHERIT as its default value, edit it in the parent resource and set it to its own ID, and use the TV's tags for the parents property value. That way all of the children of that parent resource would inherit the same value.
            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