about header and footer

Hi all

I am new to codeigniter and i am in learning stage I have some doubt in the controller. I am having header,leftsidelinks and footer in my proj which is in MVC architecture and i placed my header page in the controller constructor and when i am placing my leftsidelinks in controller i am getting error, for this i placed it in another function as leftlinks() in the controller in that i am loading the modal and the data for this one is getting from the modalfunction and for this how can i call the controller function in the indexview page of my proj

What is the exact error message?

[eluser]Michael Wales[/eluser]
Your header, footer, etc. should all be views. HTML goes in views. Your controller will then call all of these views in the correct order or a master layout view that then calls these views (my preferred method - explain in code below).

function index() {
  // Load a few posts from our blog
  $data['posts'] = $this->post->get_recent(10);

  // Our partial view to load
  $data['partial'] = 'posts/index';

  // Load our master view file
  $this->load->view('layout', $data);


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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