Welcome Guest, Not a member yet? Register   Sign In
Undefined body in template library
#1

[eluser]xtremer360[/eluser]
I'm trying to figure out why when I load this controller it says undefined index body when I am establishing the body with the build method of the library. I'm use phil sturgeon's 1.9 version of his template library.

Code:
<?php

if (!defined('BASEPATH'))
exit('No direct script access allowed');

class Control_panel extends Backend_Controller
{
    public function __construct()
    {
        parent::__construct();
    }

    public function index()
    {

        $this->template
            ->title('Control Panel')
            ->set_layout('control_panel_view')
            ->set_partial('sidebar', 'partials/sidebar')
            ->build('dashboard_view');
           //echo '<pre>';
           //var_dump($this->template);
           //echo '</pre>';
           //die();
    }
}

This is the same layout minus the sidebar that I use for my login view. And it loads fine.

Code:
<!DOCTYPE HTML>
&lt;!--[if lt IE 7]> &lt;html class="lt-ie9 lt-ie8 lt-ie7"&gt; <![endif]--&gt;
&lt;!--[if IE 7]>    &lt;html class="lt-ie9 lt-ie8"&gt; <![endif]--&gt;
&lt;!--[if IE 8]>    &lt;html class="lt-ie9"&gt; <![endif]--&gt;
&lt;!--[if gt IE 8]>&lt;!--&gt; &lt;html&gt; &lt;!--<![endif]--&gt;

&lt;head&gt;
&lt;title&gt;&lt;?php echo $template['title']; ?&gt;&lt;/title&gt;

&lt;?php echo $template['partials']['header']; ?&gt;

&lt;/head&gt;

&lt;body&gt;

&lt;!-- Start Content --&gt;
<div class="container-fluid login">

    <div id="wrapper">

        &lt;?php echo $template['partials']['sidebar']; ?&gt;

        &lt;?php echo $template['body']; ?&gt;

    </div>

</div>

&lt;?php echo $template['partials']['footer']; ?&gt;

&lt;/body&gt;

&lt;/html&gt;




Theme © iAndrew 2016 - Forum software by © MyBB