Where is the pageNavVar mentioned in this thread??
What is an appropriate value for pageNavVar??
Thank you, Tom
-
MODX Staff
- 10,725 Posts
It's not ignoring the resources parameter, but it is assuming parents to be the current Resource on which getResources is executing, as well. If you ONLY want the resources, set parents to -1 in the second call.
-
☆ A M B ☆
- 491 Posts
Thanks! It works perfectly!
Quote from: opengeek at Oct 14, 2011, 09:39 AMIt's not ignoring the resources parameter, but it is assuming parents to be the current Resource on which getResources is executing, as well. If you ONLY want the resources, set parents to -1 in the second call.
Thank you very much, you put me off a big headache
I had a similar issue with running getresources to get a single pages information. Using this:
[[!getResources? &resources=`[[*rightCTA]]` &tpl=`tpl.content` &limit=`1` &depth=`0` &includeContent=`1` &first=`0` &sortdir=`ASC` ]]
solved the problem.
The issue was that getResources was returning all of the child resources of the page that I was currently on. The above line makes sure that the page I'm on is at the top of the result set and that no more that 1 result set is returned. A little bit of a hack, but it works.