S
S
Sergey Miller2019-01-31 19:14:34
MODX
Sergey Miller, 2019-01-31 19:14:34

How to display additional fields of pdoResources MODX Revo child resources?

The resource structure is as follows:

-Главная страница обучения
---Тема урока 1
-----Урок 1
-----Урок 2
---Тема урока 2
-----Урок 1
-----Урок 2

On the pages of the topics of the lessons, I created additional fields TV and only display them on the main page of the training + I created a don field TV on the page of each lesson directly, and I also display this field on the main page of the training.
It turns out that the main one has one id, each topic has a different id and each lesson has a different resource id.
But the problem is that only topic fields are displayed on the main page, but there are no lessons ((( Since lessons are children of topics, and they are their parents, but the main learning page is the parent of all pages of topics and lessons.
I draw the output like this:

How to display the fields of children (lessons) on the main page?
5c531ed9d01b5823513002.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Lunegov, 2019-01-31
@blackseabreathe

Sergey, I would advise you to use pdoMenu instead of pdoResources . Or, in the itemsLessons chunk, make another call to pdoResources , which will display lessons, but this will create a bunch of database calls, and with pdoMenu you will do it in one call. PS means for you to watch at the first level (i.e. only the topics of the lessons).
&depth=`0`

A
Anton Tarasov, 2019-01-31
@an-tar

&tpl=`itemsLessons`

Well, show me a chunk?
Do not forget that the snippet has another parameter
&tvPrefix
and by default it is tv. , so I'm wondering how you're trying to infer?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question