Shame that the thread asking for a dumbed down intro to getResources was locked. I have been struggling all morning to get the snippet working, and after figuring out the problem I felt like taking a break and jotting down a dumbed down intro to this very useful and generously shared Modx Revolution snippet. So here goes a newby attempt at a dumbed down "HowTo":
1. Download the getResources transport package from Modx.
2. Upload it to the core/packages folder.
3. In the Modx Manager, go to System -> Package Management. In the Packages table, click "Add New Package". To first add, then install getResources. If installed correctly, it will appear in the list of Snippets in the Elements section of the Manager on the left.
The following instructions assume you want to use getResources to list summaries (with links and maybe a photo) of resources/documents that can be created as child resources of a single parent resource (but it doesn’t have to be that way.
4. Create the resource that will be the parent, and then create the child resources for this parent (the child resources are the ones that are going to be listed). Right-click on the parent in the resource list and select "Create new document here", or create a new resource and then use the parent resource setting to identify its parent. The child resources will end up being contained within the parent folder. Make sure the little "Published" box is ticked for all these resources. The "Hide from menus" option can also be ticked.
5. Create the chunk to template the listing for each resource and include all the necessary placeholders. Here’s one as an example. Note the use of the plus sign instead of the *. Here is mine from this morning:
<a href="[[~[[+id]]]]" title="[[+pagetitle]]>[[+listphoto]]</a><p><strong><a href="[[~[[+id]]]]" title="[[+pagetitle]]">[[+pagetitle]]</a></strong><br />[[+introtext]]</p><div class="clear10"></div>
+listphoto refers to a template variable. These are called from within the chunk just like the pagetitle, introtext and other resource fields.
6. Include the snippet call either in the template for the resource where the resource list is to appear or in the content area of that resource - makes no difference. It might look like this:
[[!getResources? &parents=`20` &showHidden=`1` &tpl=`propertyleftcollist` &includeTVs=`1` &processTVs=`1` &tvPrefix=``]]
20 is the id of the resource that contains the child resources to be listed. showHidden is set to 1 to make sure resources that have been hidden from the menu are also retrieved and listed. I want to get at least one TV so I include &includeTVs and &processTVs and I haven’t added the tv. prefix to the TV calls in my chunk so I stop getResources looking for it by setting the prefix to empty with &tvPrefix=``
Bascially I am now waiting for Bob Ray to write a fantastic book that just makes everything so crystal clear.