-
- 674 Posts
put a horizontal menu of the childrens of a document whith left image about link
usage create a new folder call thumbs in root of modx
upload a blank gif for items whithout thumbs and the rest of the gif thumbs files
in the page you want thumbs put the name of the gif file whithout extension
in the description field
if(!isset($pid) || $pid == ’’) {
$pid = $etomite->documentIdentifier; //current document
}
// list order by specified field
if(!isset($order) || $order == ’’) $order=’menuindex’;
// get childrens, and show some info when no childrens founds
$children = $etomite->getActiveChildren($pid, $order);
// close list in div (optional, you can change it, whatever)
$childrenCount = count($children);
// lists all childrens as links
for($x=0; $x<$childrenCount; $x++) {
$menu .= "<a href=’[~".$children[$x][’id’]."~]’$active><img src=’thumbs/".$children[$x][’description’].".gif’align=’middle’>".$children[$x][’pagetitle’]."</a>";
}
return $menu;
vased in etomite show childs snippet