[eluser]jaswinder_rana[/eluser]
I have header and footer that I use in my views like
views/Sample.php
Code:
<?php echo $this->load->view('header');?>
BODY
<?php echo $this->load->view('footer');?>
I have sidebars both in header and footer. I want to include some items that I want to be displayed on ALL pages like "5 New listings" on left side and "Featured Listings" on right side.
I am not sure how to load those? I can create specific views like new.php and featured.php and then just load those.
My problem is, I am not sure how to load data for those views?
- Should I create a MY_Controller and then load that data in there?
- Should I create a library, put loader function in constructor and then autoload that library?
Thanks