pdoResources - using "where" to select a child

Hello!
Please help me, if possible, to select with pdoResources the resources existent in a specified child of a container.
For example, I have the top level container, named Books and two children Technical and Belletristic. Each of them contain specific books.

I want to display them in two different sections of a page. I think I need something like `where parrent is "%Technical"` but I did not find examples and I need to solve this fast.

Thank you for support!
Claudiu Ro
16 января 2019, 11:35
modx.pro
885
0

Комментарии: 5

Василий Наумкин
16 января 2019, 11:40
0
You can specify any parent by id:
[[!pdoResources?
    &parents=`10`
]]
or
[[!pdoResources?
    &parents=`10,12`
]]
to get children from multiple parents
    Claudiu Ro
    16 января 2019, 12:10
    0
    Thanks, but I need to reuse the solution. So the ID is not to good for me. I need at least a part of the Resource title. Thatțs why I need to use WHERE.
      Claudiu Ro
      16 января 2019, 12:13
      0
      I'll use pdoResources at template level, and I want to apply this template to multiple categories. So I cannot access individual IDs
        Василий Наумкин
        16 января 2019, 13:01
        0
        Then read docs of pdoField and use it with &topLevel or &top inside &parents.

        Or write your custom snippet to get id of resources from its title.
          Claudiu Ro
          16 января 2019, 13:52
          +1
          OK. Good Idea! Thank you! I'll try.
    Авторизуйтесь или зарегистрируйтесь, чтобы оставлять комментарии.
    5