Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sidebar to show for sub pages for each page?
#10
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>';
    }    
}
My Github Repos: Github
Website: DigiMute
Reply


Messages In This Thread
Sidebar to show for sub pages for each page? - by n00dles101 - 2012-08-21, 23:37:57



Users browsing this thread: 1 Guest(s)