2012-08-21, 23:37:57
Ah ok, I see whats wrong. I'm presuming that all the submenu pages also have the menu option set, if you want to output the 'title' of the page change the function to this:
Code:
function getSubMenu($page){
$children=getChildren($page);
foreach ($children as $subpage){
$title=returnPageField($subpage,'title'); // this changed from 'menu'
$url=returnPageField($subpage,'slug');
echo '<li><a href="index.php?id='.$url.'">'.$title.'</a></li>';
// or use below if you have fancy urls on
//echo '<li><a href="/'.$url.'">'.$title.'</a></li>';
}
}