1. Create a menu from admin backend by going to Layout->Menu Editor from menu
2. Now go to database and in table "engine4_core_menus" find the entry for your menu and give the same name under "name" field(if already not there)
3. Now in controller to assign the menu to a view variable use
where 'credit_main' is the 'name' of your menu from table "engine4_core_menus"
To render menu in view use
2. Now go to database and in table "engine4_core_menus" find the entry for your menu and give the same name under "name" field(if already not there)
3. Now in controller to assign the menu to a view variable use
$this->view->navigation=Engine_Api::_()->getApi('menus','core')->getNavigation('credit_main');
where 'credit_main' is the 'name' of your menu from table "engine4_core_menus"
To render menu in view use
echo $this->navigation()->menu()->setContainer($this->navigation)->render();
No comments:
Post a Comment