-
☆ A M B ☆
- 209 Posts
I am trying to list fellow children under a single resource. So if I had 5 child resources of a single resource and I was viewing one of those children, in the sidebar on my website the other child resources would be listed.
Thanks!
Ben Morrison
Hacking templates to pieces since 2003
you can use wayfinder, getResources, pdoMenu, pdoResources, migxLoopCollection, rowboat........
for example getResources:
[[getResources?
&parents=`[[*parent]]`
&resources=`-[[*id]]`
&tpl=`yourTplChunk`
]]
-
☆ A M B ☆
- 209 Posts
Thanks! My one issue is that when on the parent resource, that doesn't show it's children (obviously). Is there a way to make it so that if a resource has no parent, it instead shows it's own children? This is in a sidebar so it is uniform throughout the site.
Ben Morrison
Hacking templates to pieces since 2003
discuss.answer
[[getResources?
&parents=`[[*parent:is=`0`:then=`[[*id]]`:else=`[[*parent]]`]]`
&resources=`-[[*id]]`
&tpl=`yourTplChunk`
]]
-
☆ A M B ☆
- 209 Posts
Ben Morrison
Hacking templates to pieces since 2003