how to create link with other pages in codeigniter

how to connect with other pages in codeigniter

first open your controller file in application/controller folder

and paste this code

class PagesControllers extends CI_Controller { function index(){ $this->loadHeader(); $this->loadMenubar(); $this->loadMainbody(); $this->loadSidebar(); $this->loadFooter(); } function loadPageHeader(){ // Loading header here… } function loadMenu(){ // Loading menu here… } function loadMainbody(){ // Loading the main body of the page here… } function loadSidebar(){ // Loading some here… } function loadFooter(){ // Loading footer… } } and now what you want to load in your view file just echo that function as first $this->load->view(‘loadsidebar’) and create that file in your view folder you can now access it easily.