Templatefile - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Templatefile (/showthread.php?tid=34709) |
Templatefile - El Forum - 10-07-2010 [eluser]Fireclave[/eluser] Hi, i am using a Templatefile: Controller Code: function index() Temlatefile Code: $this->load->view('includes/header'); But my Problem is, that the $data in my Controller will lost, because i send it to the template and not to the content page... Do you have any idea ? Possible is this in the Controller: $d[$data]; $this->load->view('template', $data); but i don't like this way. Templatefile - El Forum - 10-07-2010 [eluser]InsiteFX[/eluser] Give this a try: Code: function index() { InsiteFX Templatefile - El Forum - 10-07-2010 [eluser]Fireclave[/eluser] $this->load_vars($data); This is new ;-) Thank you Templatefile - El Forum - 10-07-2010 [eluser]InsiteFX[/eluser] Your very welcome, take a look at the loader library! InsiteFX |