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!
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!
Комментарии: 5
You can specify any parent by id:
[[!pdoResources?
&parents=`10`
]]
or[[!pdoResources?
&parents=`10,12`
]]
to get children from multiple parents
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.
I'll use pdoResources at template level, and I want to apply this template to multiple categories. So I cannot access individual IDs
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.
Or write your custom snippet to get id of resources from its title.
OK. Good Idea! Thank you! I'll try.
Авторизуйтесь или зарегистрируйтесь, чтобы оставлять комментарии.