Welcome Guest, Not a member yet? Register   Sign In
Wierd problem
#1

[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?
#2

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

[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);
#4

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




Theme © iAndrew 2016 - Forum software by © MyBB