![]() |
[SOLVE]how pass data to subviews - 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: [SOLVE]how pass data to subviews (/showthread.php?tid=24074) |
[SOLVE]how pass data to subviews - El Forum - 10-29-2009 [eluser]li9ht[/eluser] mycontroller.php Code: $data = array("content" => "blabla bla"); template.php Code: <?php header.php Code: <html> question.. how do i load data into $title? any other simpler way or am i doing it wrongly..? [SOLVE]how pass data to subviews - El Forum - 10-29-2009 [eluser]CroNiX[/eluser] in your controller: Code: $data['title'] = 'this is the title'; Id remove loading the header from within the content template. [SOLVE]how pass data to subviews - El Forum - 10-29-2009 [eluser]Thorpe Obazee[/eluser] Code: $data['title'] = 'this is the title'; [SOLVE]how pass data to subviews - El Forum - 10-30-2009 [eluser]puzzlebox[/eluser] or this: $data= array('title'=>'this is the title', 'content'=>'here is some content'); ... .. . [SOLVE]how pass data to subviews - El Forum - 10-30-2009 [eluser]li9ht[/eluser] Quote:Id remove loading the header from within the content template.any specific reason why..? solve it by declaring the global var using Code: $this->load->vars() |