CodeIgniter Forums
Wierd problem - 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: Wierd problem (/showthread.php?tid=13174)



Wierd problem - El Forum - 11-13-2008

[eluser]new developer[/eluser]
Hello guys

I have run into a problem . I am supplying page data such title, keywords, description.

These variables are not coming up in head section but when i echo them in body, they are perfectly ok. I do not know why?


Wierd problem - El Forum - 11-13-2008

[eluser]Pascal Kriete[/eluser]
We'll need to see some code. How are you loading the views?


Wierd problem - El Forum - 11-13-2008

[eluser]charlie spider[/eluser]
ya, my money says he's loading his header before loading the variables for it.

if you are doing this:

Code:
$this->data['header'] = load->view('header', $this->data, TRUE);
$this->data['keywords'] = $this->my_model->get_keywords();
$this->load->view('some_page', $this->data);

change it to this:

Code:
$this->data['keywords'] = $this->my_model->get_keywords();
$this->data['header'] = load->view('header', $this->data, TRUE);
$this->load->view('some_page', $this->data);



Wierd problem - El Forum - 11-14-2008

[eluser]new developer[/eluser]
Thanks anyways guys..i could not figure out..i was not supplying data to header template.