pass values from controller to constructor - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: pass values from controller to constructor (/showthread.php?tid=56130) |
pass values from controller to constructor - El Forum - 11-28-2012 [eluser]livewirerules[/eluser] im trying to set a title and meta description for each function in my controller and the below doesnt seem to be working. below is the code im using Code: function __construct() can someone please help he how to get this working pass values from controller to constructor - El Forum - 11-28-2012 [eluser]jprateragg[/eluser] Can you post your view(s) (include/template; include/header)? pass values from controller to constructor - El Forum - 11-28-2012 [eluser]livewirerules[/eluser] template Code: $this->load->view($body); header Code: <!DOCTYPE HTML> pass values from controller to constructor - El Forum - 11-28-2012 [eluser]jesterhead[/eluser] your loading your header before the appropriate title and description is set in your functions. put Code: $this->load->view('include/header',array('title' => $title, 'descrip' => $descrip)); |