marczak
marczak

Reputation: 489

cake 2.3.x create menu

I need to help with add menu to my apps. I use cake 2.3.8. I tried to use MenuHelper from this article http://bakery.cakephp.org/articles/alkemann/2009/02/04/menuhelper.

I add this class to lib>Cake>View as MenuHelper.php Next I added from AppsController $helpers =>array('Menu');

But I don't know what I should to do next. I tried use

$menu->add('link_list','title','url'); 

in my view or layout but cake doesn't view $menu variable. What I do wrong?

Upvotes: 0

Views: 753

Answers (1)

dhofstet
dhofstet

Reputation: 9964

You're using the CakePHP 1.x syntax in your snippet, hence it doesn't work. In CakePHP 2.x, helpers are exposed as a property in the view and you have to use $this->Menu->add('link_list','title','url');.

Upvotes: 1

Related Questions