![]() |
How to pass database value to all view pages? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: How to pass database value to all view pages? (/showthread.php?tid=59491) |
How to pass database value to all view pages? - El Forum - 10-11-2013 [eluser]rashgang[/eluser] Hi All, I didn't created any common template for every pages. i have admin panel. In the front-end i have pages like Home, About us, career, etc............. for these menu i have created home controller seperatly and created about us controller seperately. My About us controller code structure will be like this Code: public function index() Code: <?php include('includes/header.php'); ?> Code: <?php //print_r($news); My Problem is i have insert the every controller index page Code: $data['news'] = $this->xxx_model->get_news(); How to make this dynamic for every controller and make it common for every view. i dont want to pass the data in every controller. it should be one controller. Also Currently i have created many view pages like this. Please help me. |