> So what I’m doing wrong?
&parent
s with a final "s"! I was forgetting the "s".
This is one manner of
displaying siblings with Ditto:
[!Ditto? &tpl=`autre_realisation` &parents=`[*parent*]` &config=`thumbnails` !]
Observe: GetField is not required to get the parent document.
There exists some [*parent*] TV for each document, although not visible !
Hi,
Does someone know how to list siblings with Ditto?
In structure below, I’m trying to list siblings documents 6 to 8 by calling Ditto from document with id=6.
categories (1)
|--categoryOne (2)
|--categoryTwo (3)
|--categoryThree (4)
|--categoryFour (5)
|--pageOne (6)
|--pageTwo (7)
|--pageThree (8)
I tried this:
[!Ditto? &parents=`[+parent+]` &depth=`1` &tpl=`other_reference` !]
with {{other_reference}} set to [+pagetitle+]
also this:
[!Ditto? &parents=`parent_doc` &depth=`1` &tpl=`other_reference` !]
with {{parent_doc}} set to [+parent+]
and the same with the parent_doc chunk set to
or to [[GetField? &parent=`1` &parentLevel=`1` &field=`id` ]]
Lastly, I tried to use a config file for Ditto, named "find_siblings" :
<?php
$parent = '@CODE:[[GetField? &parent=`1` &parentLevel=`1` &field=`id` ]]';
$depth=1;
?>
and to call Ditto this way :
[!Ditto? &tpl=`other_reference` &config=`find_siblings` !]
But Ditto outputs a "No documents found.".
By replacing the Ditto call by the GetField call, I could check that the direct parent (i.e. document 5) could be found.
So what I’m doing wrong?
Thanks.
Julien