2012-08-21, 23:56:02
(This post was last modified: 2012-08-21, 23:58:44 by knightcomb95.)
n00dles101 Wrote: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>';
}
}
Thank you!