Code: Select all
<div class="members">
<ul>
<?php
$members = array();
function snippet_fullmenu($parent){
global $members;
$out = '';
$childs = $parent->children(null, array(), true);
$exclude = array("");
if (count($childs) > 0){
foreach ($childs as $child)
/* Don't display specific pages */
if(!in_array($child->breadcrumb(),$exclude)){
$depth = substr_count($child->link(), '/');
if($depth == 7){
$split_name = explode(" ", $child->title());
$surname = isset($split_name[2]) ? $split_name[2] : $split_name[1];
$entry = '<li>'.$child->link($child->breadcrumb.', '.$child->content('practice')).', '.$surname.'</li>'."\r";
$out .= $entry;
$members[$surname] = $entry;
}
$out .= snippet_fullmenu($child);
}
}
return $out;
}
?>
<?php
echo snippet_fullmenu($this->find('/members/'));
//ksort($members);
//echo $members['Louw'];
//foreach ($members as $s => $value){
//print $count++;
//print($value . "<br>");
//}
?>
</ul>
</div>Can anyone help!?