bmcclure / CakePHP-Menu-Plugin

A CakePHP 2.0 plugin designed to help build menus in the controller and display them in the view
MIT License
17 stars 9 forks source link

Helper class MenuBuilderHelper could not be found. #14

Open larry-tx opened 11 years ago

larry-tx commented 11 years ago

I installed the plugin as described in the instructions, including renaming the plugin directory to "menu_builder." Added it to the $helpers array as MenuBuilder.MenuBuilder, and constructed the beforeFilter array pretty much as described in the instructions. Added it to my default layout as described, and I get fatal error: Error: An Internal Error Has Occurred. Helper class MenuBuilderHelper could not be found. The only helper class in the plugin that I can find is MenuRendererHelper. What do I need to do to make it work?

bmcclure commented 11 years ago

Sorry for the delay. The documentation is actually from a very old version of the plugin, I've completely rewritten it since then.

If you're using CakePHP 2, the plugin directory should be 'Menu'. In your app's bootstrap file, the plugin should be loaded like this:

CakePlugin::load('Menu', array('bootstrap' => true));

You can then use the MenuBuilderComponent to build your menus and the MenuRendererHelper to output them in your views.

I will be rewriting the documentation over the coming days. Sorry for the confusion!