Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sidebar to show for sub pages for each page?
#11
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!
Reply


Messages In This Thread
Sidebar to show for sub pages for each page? - by pierre - 2012-08-21, 23:56:02



Users browsing this thread: 1 Guest(s)