We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14915
    • 43 Posts
    Hi,

    I’d originally asked this question here:
    http://modxcms.com/forums/index.php/topic,52110.0.html

    I’ve reposted it here, since this is the place for getResources questions.

    Background:

    After I installed the getResources package, it did not create a getResources snippet for me.

    I manually created a snippet called "getResources" which includes the file from core/components/getresources/snippet.getresources.php.

    Also, I had to make by documents published, because getResources only returns published documents.

    Question:

    I’m calling getResources like this:

    [[!getResources? &parents=`14` &includeContent=`1` &includeTVs=`1` &tpl=`featuredArticle`]]
    


    My featuredArticle chunk looks like this:

    Testing: 1,2,3 <br />
    [[+pagetitle]]
    <br /><br />
    [[+content]]
    


    I see that the snippet is running, by looking the queries run through MySQL’s query logs. It runs two queries, both of which return the data I’m looking for.

    However, the data is not displayed. Even if I remove the tpl parameter, nothing is displayed.
    Any help would be appreciated. Thanks!
      • 28215
      • 4,149 Posts
      Why did you make this snippet? Why not use the one that comes in the getResources package?
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 14915
        • 43 Posts
        Hi Shaun,

        I installed the package, but it did not create a snippet called "getResources" for me.

        I simply created a snippet like this:

        <?php
        include("/path/to/modx/core/components/getresources/snippet.getresources.php");
        ?>
        


        Until then, the snippet.getresources.php file was not getting called when I used "[[getResources]]".
          • 28215
          • 4,149 Posts
          You should try reinstalling the snippet...there are default properties that need to be there that are in the snippet that is packaged.
            shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
            • 14915
            • 43 Posts
            Thanks for the quick reply, Shaun. That did the the trick!!!
            • I know this is an old topic, but it seems to be similar to what is happening with my install of getResources. I just get nothing.

              Can someone tell me how to check if it’s installed correctly? I’ve removed it and reinstalled it, but I’m still having problems. I get nothing and when I just call [[getresources]] I get errors.

              See my new thread here if it helps: http://modxcms.com/forums/index.php/topic,54293.0.html

              I really need to get this working to make my site a blog.
                Michael Smull
                http://www.bigpixelstudio.com
                twitter: @mdsdesign