Page 1 of 1

How do i list the side menu as an array?

Posted: Wed Aug 26, 2015 8:41 pm
by KaL
i just want to pick only one menu and it's link.

It tried something like this and it did not work.
Example:

"Content[sidemenu]->$name"

Re: How do i list the side menu as an array?

Posted: Wed Aug 26, 2015 11:25 pm
by KyleMassacre
I'm not entirely sure what you are trying to do here. Even so, I think using the $content variable is the incorrect variable. The menu is ran by a hook. If you look in a menu.php file you will see the $menuEntries variable so you maybe be able to pick what you want from there by looping through them:

Code: Select all

foreach($menuEntries as $menu) {
    if($menu['key'] == "this") {
        echo $menu['key'];
    }
}

Re: How do i list the side menu as an array?

Posted: Thu Aug 27, 2015 6:55 am
by KaL
Sweet! Thanks Kyle. Now I can move on with my project.