Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthorkevin.klika

    I have a menu that I want to include in my layout. I thought the best way to do this would be to use a navigation helper to display the menu. All the menus and menu items are in the database. I have the models created, but when I try to do:

    class NavHelper extends AKActionViewHelper{
        function generateDropdown($menu_name){
            $menu = Menu::findFirst('name = ?',$menu_name);

    and call it in my view:

    <?php echo $nav_helper->generateDropdown('main'); ?>

    it throws an error, saying 'class Menu is undefined'.

    I really dont want to have to manually include it in the helper, shouldnt it autoload?


    • CommentAuthorsuthern

    Is 'Menu' the name of a controller? If so, load it in the current controller like so:

    var $controllers = array('Menu');