When you need different wayfindercalls on different levels you can make
chunk1 with: &startId=`[*id*]`
chunk2 with: &startId=`[*parent*]`
and use this snippet to call the chunk you need at different levels
<?php
//
//GetChunkByLevel
//
//[[GetChunkByLevel? &chunks=`,,,@CODE<h4>Aufgaben:</h4>,@CODE<h4>Subaufgaben:</h4>` &debug=`0` ]]
//[[GetChunkByLevel? &chunks=`chunk0,chunk1,chunk3,projectlist,projectlist` &debug=`0` ]]
$chunks_arr = (isset($chunks))? explode(",",$chunks) : array(); // [ array ]
$debug = (isset($debug))? $debug :0;
$current_level = ( count( $modx->getParentIds( $modx->documentObject['id'] ) )+1 );// von Stefan
$output=$chunks_arr[$current_level];
if ($debug == '1'){
echo 'current_level '.$current_level.' ';
echo 'chunk '.$output;
}
if (substr($output,0,5) == '@CODE'){
$output = trim(substr($output,5));
}
else {
$output= "{{".$output."}}";
}
return $output;
?>
call it with:
[!GetChunkByLevel? &chunks=`chunk0,chunk1,chunk2` &debug=`0` !]
Bruno