TIP: Use Markdown or, <pre> for multi line code blocks / <code> for inline code.
These forums are read-only and for archival purposes only!
Please join our new forums at discourse.kohanaframework.org
How to make common menu available to all the views?
  • I'm having problem to display the menu in all the views. I've extended the "Template" controller with new controller "Basic" and added the menu functionality their. Again I've extended the "Basic" controller in "Index" controller to print that menu in the view. It's working fine in the action_index, I can able to access the menu variable. But in other action i used new View File, Now the Menu Variable is not accessible.

    Please help me to solve this around. Or any other method to do this thing pleas tell me.

  • create a Navigation class in your app/classes folder, create a protected property $navigation in your Basic controller. modify in all other extended controller the $navgation property , create a new navigation in basic before method and bind it global in after

    View::set_global('navi',$navigation); now you can access it in all view <?= foreach($navi as $menu) ?>

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion