• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dashboard navigation problem

#2
You can either have two different controllers, and do
Code:
<a href="<?php echo site_url($isAdmin === true? 'admin/dashboard' : 'users/dashboard') ?>">...

Or you could have single controller, link to users/dashboard, but then do
PHP Code:
$this->load->model('user_model');

$this->load->view('templates/header');

if (
$isAdmin === true) {
    
$data['title'] = 'Admin Dashboard';
    
$data['appdetails_admin'] = $this->user_model->getapp_admin();
    
$this->load->view('users/admin_dashboard'$data);
} else {
    
$data['title'] = 'Dashboard';
    
$data['appdetails_show'] = $this->user_model->getapp();
    
$this->load->view('user/dashboard'$data);
}

$this->load->view('templates/footer'); 
Reply


Messages In This Thread
Dashboard navigation problem - by kvanaraj - 09-18-2018, 07:13 AM
RE: Dashboard navigation problem - by Pertti - 09-18-2018, 07:23 AM
RE: Dashboard navigation problem - by Wouter60 - 09-18-2018, 11:02 AM
RE: Dashboard navigation problem - by kvanaraj - 09-19-2018, 07:12 AM
RE: Dashboard navigation problem - by Wouter60 - 09-19-2018, 08:37 AM
RE: Dashboard navigation problem - by kvanaraj - 09-19-2018, 10:28 PM
RE: Dashboard navigation problem - by InsiteFX - 09-20-2018, 04:30 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.