[eluser]xtremer360[/eluser]
I'm using the same template library that phil sturgeon created and I have the following layout for my control panel. I am getting this error. I ran a var_dump on the template variable inside the control panel controller and it showed the string of the control panel view but when I do the same thing inside of the content view it says there was no body index. I would like to know how I can pass the data to the content view.
Any ideas for me?
Severity: Notice
Message: Undefined index: body
Filename: partials/content.php
Line Number: 8
Control Panel Controller
Code:
<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Controlpanel extends Backend_Controller
{
public function __construct()
{
parent::__construct();
}
public function index()
{
$this->template
->title('Control Panel')
->set_layout('controlpanel')
->set_partial('header', 'partials/header')
->set_partial('sidebar', 'partials/sidebar')
->set_partial('breadcrumbs', 'partials/breadcrumbs')
->set_partial('content', 'partials/content')
->set('user_data', $this->users_model->get($this->session->userdata('uid')))
->build('dashboard');
}
}
content.php
Code:
<div id="content">
<!-- Insert Header -->
<?php echo $template['partials']['breadcrumbs']; ?>
<div class="separator bottom"></div>
<?php echo $template['body']; ?>
</div>