I’m trying to use pdoresources to find every siblig which has an alias of ‘gallery’.
So basically, if there is an image gallery in this section, show a button for it. This is my call:
Thanks for this. I changed it now, but it’s just putting a button on every page, regardless of whether or not there is a sibling with the alias of gallery. Strangely, it’s fine on pages futher down the tree (second level), but is ignored on all top level pages?
it’s actually adding a URL of this to the top level page buttons:
https://mydomain.com/0gallery
So I think that it’s something to do with the top level pages not actually having a parent?
Should I add something to the &where clause to ignore if the parent is 0?
For top level pages the value of [[*parent]] is 0.
So the property &parents=`[[*parent]]` in the pdoResources call evaluates to &parents=`0` .
But &parents=`0` has a special meaning, namely don’t filter the resources by parents at all.