• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Controller for header,footer and sidebar

How to create separate controllers for header,footer and sidebar so i can perform operations on it?

Please, read the CI documentation about controllers, views and models. In that order.

Please use the tutorial and recreate the demo app.
Its a great start and explains all the steps you need to know. It took me only 30min and after that everything was nice and easy

On the package it said needs Windows 7 or better. So I installed Linux.

why dont u use the header footer on views? so u can call it the view, it doesn't need to make a new controller.

You can manage header, footer, sidebar by method calling.

class Blogs extends CI_Controller {

function __construct() {

public function index() 
$output['main_page'] = array();
$this->load->view('front/includes/header', $output); //Load header
$this->load->view('front/blogs/index'); //Load middle content of page
$this->load->view('front/includes/footer'); // Load footer


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

Users browsing this thread:
1 Guest(s)

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