getAllChildren($listParent,'menuindex ASC, pagetitle','ASC','id,type,pagetitle,description,parent,alias,longtitle,published,deleted,hidemenu,content');
$output .= '
'.$ie;
foreach($children as $child){
// skip unpubs unless desired
if ((!$su && !$child['published']) || ($child['deleted']) || ($showNotInMenu && $child['hidemenu'])) continue;
$descText = ($description)? ' '.$child['description'].'' : '';
$output .= '';
$this_line_skipped = false; // (0.9.7)
if ((!$selfAsLink) && ($child['id'] == $funcModx->documentIdentifier)){
// We've established that this is the page itself. Should we show it?
if ($showSelf) { // (0.9.7)
$output .= '- '.$child['pagetitle'].'';
$this_line_skipped = true;
}
} else if (!$child['published']){
$output .= '
- '.$child['pagetitle'].'';
} else if ($child['type']=="reference") {
$output .= '
- '.$child['pagetitle'].'';
}
else {
$output .= '
- '.$child['pagetitle'].'';
}
// Post Processing on a line (page) (0.9.7)
// --------------------------------
// We might have skipped a page, due to showSelf = false. So, post-processing on a page should be
// skipped too in that case. (since version 0.9.7)
if (!$this_line_skipped) { // (0.9.7)
$output .= $descText;
if ($funcModx->getAllChildren($child['id']) && (($maxLevels==0) || ($maxLevels > $listLevel+1 ))){
$output .= MakeSiteMap($funcModx,$child['id'],$listLevel+1,$description,$titleOfLinks,$maxLevels,$su,$selfAsLink);
}
$output .= '
'.$ie;
}
}
$output .= '
'.$ie;
return $output;
}
}
return MakeSiteMap($modx, $siteMapRoot, 0, $showDescription, $titleOfLinks,$maxLevels,$showUnpubs,$selfAsLink);
?>