We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36924 ☆ A M B ☆
    • 298 Posts
    Thanks.

    Here are two trials:

    [[!getResources? &tpl=`personnelTpl` &includeTVs=`1` &limit=`0` &processTVs=`1` &tvPrefix=`` &debug=`true`]] 

    [[!getResources? &parents=`[[*id]]` &tpl=`personnelTpl`]]
      • 3749
      • 24,544 Posts
      What happens when you try to use them? [ed. note: BobRay last edited this post 13 years ago.]
        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
        • 36924 ☆ A M B ☆
        • 298 Posts
        The section where the result of getResources should be displayed is just blank. No output in both instance. Same experience I have had since this year.
          • 3749
          • 24,544 Posts
          Are the current resource (the one containing the tag) and its children published and not hidden from menus?

          Are there any ACL entries protecting them?

            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
            • 36924 ☆ A M B ☆
            • 298 Posts
            Yes the current is published and the children (by the way that's why getRelated outputs as required).

            No ACL protecting them. Is it possible that getResources is just not installed properly or broken? How do I check for that? I just love that snippet because it's like a GUI SQL select statement or like views in Drupal! I hope I can get it to work for me like it used! [ed. note: ojchris last edited this post 13 years ago.]
              • 3749
              • 24,544 Posts
              It's possible that the snippet has a corrupted file or some bad code. getResources is very good about being removed so you can uninstall and remove all versions of it (that may take several iterations in Package Manager), clear the cache manually, then download and install the newest version in Package Manager.

              You might post your Tpl here too, in case there's something going on there.
                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
                • 36924 ☆ A M B ☆
                • 298 Posts
                I'll reinstall asap.

                Meanwhile, here is the TPL:
                <tr>
                            <td valign="top"> </td>
                            <td> </td>
                          </tr>
                <tr>
                            <td width="24%" valign="top"><img src="assets/directory/[[+personnelPix]]" width="105" height="130" alt="[[+personnelName]]" /></td>
                            <td width="76%" class="style14"><p><strong>[[+personnelName]]</strong></p>
                              [[+personnelBrief]]
                              [[+personnelContact]]
                </td>
                          </tr>
                  • 3749
                  • 24,544 Posts
                  That ends up inside a table tag, right? wink

                  When you do a "View Source" do you see any of the code?
                    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
                    • 36924 ☆ A M B ☆
                    • 298 Posts
                    Yes, in a table. No output at all, not even an html tag.

                    I uninstalled the snippet, removed it entirely and reinstalled again via the package management. Still doesn't output anything (whether on localhost or on the live site)
                      • 3749
                      • 24,544 Posts
                      That's really odd. What happens if you put this tag in the content section of a resource that has published children:

                      [[!getResources? &parents=`[[*id]]` ]]


                      BTW, there is no default "content TV". For one thing the 'content' field is a resource field (as are pagetitle, description, introtext, etc.), not a TV. TVs are the things in the Template Variables section of the Elements tree that you create. This isn't a criticism, I'm just trying to make sure we understand each other.

                      More importantly, there are no default fields. No fields will show up unless you put a tag for them somewhere. If the resource's template doesn't have a tag for a resource field, the field won't be shown. For example:

                      <h3>[[*pagetitle]]</h3>
                      
                      <div id="content>
                       [[*content]]
                      </div>
                      


                      My apologies if you knew all that already. wink
                        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