Codeigniter How to Dynamically create menu

orelss

New Member
So I have a menu that I want to generate a main menu based on the authenticated user's access level. No problem creating the menu, however I want to automatically create the generated menu in my "header" view. So in my controller I am calling the "header" view, but I don't want to pass this dynamic part of the header like this:\[code\]$data['menu'] = 'Some Generated HTML Menu';$this->load->view('header',$data);\[/code\]I would rather it already be included in my header file, but I'm not exactly sure how to do this (aside from adding the $data declaration from inside of my constructor).
 
Back
Top