How do i list the side menu as an array?

General Chat, Comments
Post Reply
KaL
Posts: 344
Joined: Mon Jan 13, 2014 5:44 am

How do i list the side menu as an array?

Post 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"
User avatar
KyleMassacre
Posts: 573
Joined: Wed Nov 27, 2013 12:42 pm

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

Post 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'];
    }
}
KaL
Posts: 344
Joined: Mon Jan 13, 2014 5:44 am

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

Post by KaL »

Sweet! Thanks Kyle. Now I can move on with my project.
Post Reply

Return to “General”