Pdoresources: list links and images only from third level and deeper in resource tree

Hi,

I have a website, with different resource folders, with each multiple levels underneath.

In the sidebar, I need a list of links with the tv image, only from the third level in the resource tree and the fourth.

I use pdoResources, but the problems are the following:

1/ when I use pdoresources, I need only the images and links which are under one folder. I partially succeed, but when clicking deeper into the levels, the parents disappear as links. This is because pdo takes only the parent which is one level higher:
I use
[[!pdoResources?
&parents=[[*parent]]

2/ When I use
[[!pdoResources?
&parents=[[*UltimateParent]] ,

It just uses the first page in the resource tree, but not the top level item, under which the deeper levels are.
This is really bizarre, the top level resource, which is a container-folder that is hidden and published, should be the result of [[*UltimateParent]] ?

So I just need like a menu which has one level as submenu’s, but only within the same folder.
Each page has also a custom image TV, which when available should be shown instead of the linked pagetitle.
There are different folder in the resource tree.

I am confused …

thanks for the help

I can’t make much sense out of the description, maybe screenshot of manager tree would help. But I think you should check pdoMenu for your implementation instead of pdoResources. pdoMenu comes with pdoTools, so it is already available.

pdoMenu has an attribute to check the element level:
https://docs.modx.pro/en/components/pdotools/snippets/pdomenu

Then you can create a condition based on what you need.

pdoResorces does not support level placeholder unfortunately. I needed this recently and was a nightmare.
If you need to use the TV value if set, then explore the output modifier ‘default’

Example:

      [[*theTVname:default=`[[*pagetitle]]`]]

Everytime the TV is not set or empty, it will use pagetitle instead.

Hope this helps somehow.