I ask for help, I suffer for several hours ...
Is it possible in modx using pdoResources to display resources with a specific template id that have a common parent but can themselves be nested inside it?
Read more
The structure of the documents (nesting) is as follows:
page1 (главная родительская) -subpage1 -subpage1 -subpage1 --subsub-page1 --subsub-page1 --subsub-page1 --info1 --info1 page2 (главная родительская) -subpage2 -subpage2 -subpage2 --subsub-page2 --subsub-page2 --subsub-page2 --info2 --info2 on the pages of "sub-pageX" and "sub-sub-pageX" (that is, on the pages of the second and third level) I add additional. fields taken from info are as follows:
[[pdoResources? &parents=`0` &templates=`12` &useWeblinkUrl=`1` &context=`[[*context_key]]` &tvPrefix=`` &tpl=`popular-item` &includeTVs=`time,cost` ]] As a result, I get resources with the template "12" (this template is for all "info") a link to the resources, as well as the values of their time and cost fields. I deduce these fields.
Problem
The pages "sub-page1" and "sub-sub-page1" display the data from the resources "info1" and "info2", and it is necessary that ONLY the values "info1" are output,
well, on the "sub-page2" and "sub-sub-page2" pages - ONLY the values "info2".
is it possible? :(
PS
&parents=`[[*id]]` it would seem to solve the problem, but the common parent is only the most important one, and the arrangement of documents further down the branch does not allow to implement this solution.