Welcome Guest, Not a member yet? Register   Sign In
[Solved] Content from <Head> is inserted in <Body>. Why?
#3

[eluser]talldarkmystere[/eluser]
If you're including your head as part of a sub-view that is then included in another template, be sure that you're using the TRUE flag to tell CI that it needs to process the sub template before passing it to the main one.


Code:
$headerdata['title'] = 'My Page Title';
$headerdata['css'] = 'mycssfile.css';

$data['head_content'] = $this->load->view('head_sub_template', $headerdata, TRUE);

$this->load->view('body_template', $data);

Without the TRUE flag, the content will still be passed, but it will be thrown into the top of the page.


Messages In This Thread
[Solved] Content from <Head> is inserted in <Body>. Why? - by El Forum - 01-21-2011, 01:49 PM



Theme © iAndrew 2016 - Forum software by © MyBB