Hi all,
Very new to modx and have been playing with ditto.
What I want to know is can you use ditto to find an articles sibling articles. I know this is possible by specifiying the parent but ideally I would like to do this automatically without knowing the parent id. Is this possible??
Thanks in advance
Do you want to show all the documents?
yes all siblings of a particular page
This should be doable with using the ultimate parent snippet to set the parent of the ditto call, If I remember right you need to set level in the ultimate parent or it goes all the way to the root take a look at the docs for ultimate parent for details.
for children of one document you do it with:
for siblings use
if you want to have another output for the active document you can use phx in your ditto-chunk:
[+id:is=`[*id*]`:then=`
this is the output for my active document
`:else=`
here comes my siblings output:<h4>[+pagetitle+]</h4>.....................
`+]