It's been a while since I worked with Etomite and I'm not sure I use all the functions right.
take a look at this snippet. It's suppossed to give a list of all the documents under the current page. But it doesn't do anything. I can't find out why.
I call this snippet like : [[ShowChild]]
// Snippet name: ShowChild
// Snippet description: Builds list of childeren documents of current document
// INPUT: id, sortHow, displayWhat, sortBy,
// Revision: 1.00 ships with Etomite 0.6.1-Final
// no id set? get current document id
$id = isset($id) ? $id : $etomite->documentIdentifier;
// What field to display, default is pagetitle
$displayWhat = isset($displayWhat) ? $displayWhat : 'pagetitle';
// default sort is on menuindex ASC
$sortBy = isset($sortBy) ? $sortBy : 'menuindex';
$sortHow = isset($sortHow) ? $sortHow : 'ASC';
// select fields.
$fields = "id, pagetitle, description, longtitle, alias";
// END of config
$children = $etomite->getActiveChildren($id, $sortby, $sortdir, $fields);
$childrenCount = count($children);
if($children==false) {
return false;
}
$menu = "";
$menu .= "<div class="showChild"><ul>";
for($x=0; $x<$childrenCount; $x++) {
$menu .= "<li><a href='[~".$children[$x]['id']."~]'>".$children[$x][$displayWhat]."</a></li>";
}
$menu .= "</ul></div>";
return $menu;
can anybody help me out?












