Answer the question
In order to leave comments, you need to log in
How to correctly display the menu (using codeigniter as an example)?
I need to display a menu that only the admin will see. Naturally, I check that this is the admin, and display the menu, everything happens in the controller:
$this->load->view('templates/header', $data);
if ($this->ion_auth->logged_in() and $this->ion_auth->is_admin())
{
$user = $this->ion_auth->user()->row();
$this->load->view('admin/admin_menu');
}
$this->load->view('news/view', $data);
$this->load->view('templates/footer');
if ($this->ion_auth->logged_in() and $this->ion_auth->is_admin())
{
$user = $this->ion_auth->user()->row();
$this->load->view('admin/admin_menu');
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question