[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>
<!--[if lt IE 7]> <html class="lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html> <!--<![endif]-->
<head>
<title><?php echo $template['title']; ?></title>
<?php echo $template['partials']['header']; ?>
</head>
<body>
<!-- Start Content -->
<div class="container-fluid login">
<div id="wrapper">
<?php echo $template['partials']['sidebar']; ?>
<?php echo $template['body']; ?>
</div>
</div>
<?php echo $template['partials']['footer']; ?>
</body>
</html>