Hi there,
I would like to make nested getResources calls. I have made folders (which act as FAQ categories) with resources in them (which act as the actual questions). So my desirable output will look like this:
General questions
- General question 1
- General question 2
Technical questions
- Technical question 1
- Technical question 2
And so on..
You can make this with nested ditto calls, as described here:
http://modxcms.com/forums/index.php/topic,49841.0.html. But I would like to do it with getResources, because I like getResources

. My approach is as follows:
Chunk
[[!$faq]] (so my end-users can’t scew up the getResources call)
[[getResources? &parents=`40` &tpl=`faqCategories` &depth=`1` &includeContent=`1`]]
Chunk tpl
faqCategories
<h3>[[+pagetitle]]</h3>
[[!getResources? &parents=`[[+id]]` &tpl=`faqCategoriesChild` &depth=`1` &includeContent=`1`]]
<hr />
Chunk tpl
faqCategoriesChild
<h4>[[+pagetitle]]</h4>
<p>[[+content]]</p>
This outputs only the following by me:
- Financial question 1
- Technical question 1
- Technical question 2
Financial questions
- Financial question 1
- Financial question 2
General questions
- General question 1
- General question 2
(Bold = <h3>)
(Italic = <h4>)
Look what happens with the financial question 1! It’s printed twice. Once as a <h3> (should be only used for category heading), and once as a <h4>, nicely inside it’s category. Some other questions also don’t turn out well, and some others do turn out well as you can see. I’ve no idea what caused this. I’ve double checked all resources for ’is folder’, ’published’, and so on..
Well.. actually my question is as follows; can I use nested getResources calls?
(I’m using modx 2.0.4-pl2 with getResources 1.2.2pl)
(tags: call inside call, sort, show child sorted by parent)