We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37339
    • 10 Posts
    Alright, my friends. Apologies if this has been discussed a million times, but none of the solutions I've seen posted have worked for me. Not sure if posting all this info will help jog a fix from one of you, but it's worth a shot. I'm quite new to MODx, and am at a loss here. (And I don't wish to revert to Evo just to use Ditto as some of the other users have.)

    I'm using getResources to call all the resources under a parent. This is to display thumbnails and text which are all contained withing TVs. However, it doesn't output anything. I'm not sure what's happening, but here's all the info for you:

    Snippet call (in a Chunk):
    <div id="releasesContainer">
    [[!getresources?
    &parents=`[[*id]]`
    &tpl=`list_studio_releases_tpl`
    &sortdir='DESC'
    &includeTVs=`1`
    &processTVs=`1`
    &tvPrefix=``
    &depth=`1`
    &sortby=`menuindex`
    ]]
    </div>


    list_studio_releases_tpl Chunk:
    <div id="releasesThumbs">
    <img src="[[+release_thumb]]" border="0">
    <div class="overlay">
    <br />
    <span class="style3"><strong>[[+release_artist]]</strong>
    <br />
    <p class="style6">[[+release_title]]
    <br />
    <p class="style1">[[+release_date]]
    </p>
    </p>
    </span></div>
    <div class="overlayLink">
    <a href="[[+release_url]]"><img src="assets/releases/img/overlay.png" border="0"></a>
    </div>
    </div>


    MODx version: MODX Revolution 2.1.3-pl (traditional)
    getResources version: 1.4.0
    Server info: WAMPServer 2.1
    Apache version: 2.2.17
    PHP version: 5.3.0
    MySQL version: 5.5.8

    Have tried:
    -clearing cache
    -reinstalling getResources
    -re-writing the snippet call
    -outputting simple text only in the tpl
    -publishing/un-publishing resources

    The child resources in question aren't hidden from the menus, nor do they have any actual content (other than the TVs). I can get their content to display using strictly code, but I need this to be relatively automatic and painless for a client. Also, I haven't touched the getResources snippet itself, so all that code is as-is upon download.

    Any possible help would be greatly appreciated. Hopefully it's just an error in my code, because I'm kind of a moron. And thank you in advance for bearing with a MODx beginner.
      • 22303 MODX Staff
      • 10,725 Posts
      In your example call posted above, you are calling the "getresources" snippet instead of "getResources".
        • 37339
        • 10 Posts
        Egads, you're right. See what coding without coffee does? Thanks for pointing that one out, mate. However, still no output after fixing that. Still though, much obliged. smiley
          • 22303 MODX Staff
          • 10,725 Posts
          Remove the &tpl property; do you get any output? If not, you are not getting the Resources. Make sure they are published, or you set
          &showUnpublished=`1`
          and that you have the correct parents specified.
            • 37339
            • 10 Posts
            Hmm, nothing when I removed the &tpl property. The Resources are published, but I also tried with the piece you sent anyway. Still nothing, sadly. Yes my Resources do work with getResourceField, and the rest of the site is functional. Given that I've re-installed getResources during this, it might possibly be a problem with my localhost rubbish.

            I think I'll try putting this up on my webspace to see if that does anything. I thank you very much again for your help, though!
              • 36592
              • 970 Posts
              Try this.
              &showHidden=`1`
                • 37339
                • 10 Posts
                The Resources aren't hidden from menus, but I tried with that anyway. Still no dice. *shakes fist* Thanks, though! It was worth a shot.

                Currently waiting on an upload to my web server (which, of course, is being slow because I apparently killed the internet and technology as a whole while doing this), with the hope that it somehow magically gets fixed.
                  • 37339
                  • 10 Posts
                  Okay, upon messing around with this for some time, I took out the :
                  &sortdir='DESC'

                  It works now for some reason. Not entirely sure why that happened, but I'll not argue this. Thanks for the help, guys! You rock.
                    • 36592
                    • 970 Posts
                    Do not use single quote. Use back tick for parameters.
                      • 37339
                      • 10 Posts
                      Oh, wow. I didn't even realize that I had used quotes for that. *sigh* Thanks, mate!