[eluser]Unknown[/eluser]
Hello Everyone,
I am using grocerycrud. I am getting the following error message when I am using it with my template system:
A PHP Error was encountered
Severity: 4096
Message: Object of class stdClass could not be converted to string
Filename: desktop/mainpage.php
Line Number: 9
My controller:
Code:
function dashboard(){
$crud = new grocery_CRUD();
$crud->set_table('clients');
$data['clientgrid'] = $crud->render();
// Load the DashBoard
$data['desktop'] = 'desktop/mainpage';
$this->load->view('desktop/desktop', $data);}
Desktop.php view: (template setup)
Code:
<?php $this->load->view('desktop/header'); ?>
<?php $this->load->view($desktop); ?>
<?php $this->load->view('desktop/footer'); ?>
mainpage.php view (shows the actual page)
Code:
<div id="mydashboard">
<div class="title">My Dashboard</div>
<div class="modulecontainerleft">
<div class="moduletitle">Client List</div>
<div class="grid">
<?php echo $clientgrid; ?>
</div>
</div>
</div>
</div>
If I don't go through the template system, the grid load successfully.
Any suggestions or help will be greatly appreciated