Welcome Guest, Not a member yet? Register   Sign In
Page Navigation
#1

[eluser]Unknown[/eluser]
Hi,
Am new in codeigniter.need help to fix route issues
Am building a small application with codeigniter but am having challenges with navigating from one page to another.

firstly: i have an admin called http://localhost/koeweb/dashboard which loads fine.
secondly: am trying to go to another page within the admin,say http://localhost/koeweb/dashboard/page2 and i get 404 Page Not Found.

My Route:
$route['(:any)'] = "home/$1";
$route['default_controller'] = "home";
$route['dashboard/(:any)'] = "dashboard/$1";
$route['dashboard'] = "dashboard";

My controller:
Code:
<?php

class Dashboard extends CI_Controller{
  
    public function __construct() {
        parent::__construct();
        $this->load->model('parish_model');
    }

    public function index(){
            
        $this->load->view('dashboard/inc/header_view');
        $data['query'] = $this->parish_model->getParish();
        $this->load->view('dashboard/dashboard_view', $data);
        $this->load->view('dashboard/inc/footer_view');
    }
  
    public function page2(){
        $this->load->view('dashboard/inc/header_view');
        $this->load->view('dashboard/add_parish');
        $this->load->view('dashboard/inc/footer_view');
    }
}



Messages In This Thread
Page Navigation - by El Forum - 09-03-2014, 09:47 AM
Page Navigation - by El Forum - 09-03-2014, 02:33 PM
Page Navigation - by El Forum - 09-04-2014, 01:12 AM
Page Navigation - by El Forum - 09-04-2014, 01:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB