[eluser]Skoobi[/eluser]
Hi im trying to add an image CRUD plugin to my CMS which i done through Tuts but im getting
Message: Undefined variable: output
Which is obviously the variable $output is not getting passed through. But the problem i have is that i cant figure out how to pass it with the setup i have...
Heres the controller
Code:
<?php
class Gallery extends CI_Controller {
function __construct()
{
parent::__construct();
$this->load->library('image_CRUD');
}
function _example_output($output = null)
{
$this->data['subview'] = "admin/gallery/index";
$this->load->view('admin/_layout_main', $this->data);
var_dump($output);
}
function index()
{
$this->_example_output((object)array('output' => '' , 'js_files' => array() , 'css_files' => array()));
}
function view()
{
$image_crud = new image_CRUD();
$image_crud->set_primary_key_field('id');
$image_crud->set_url_field('url');
$image_crud->set_table('example_1');
$image_crud->set_image_path('assets/uploads');
$output = $image_crud->render();
$this->_example_output($output);
}
}
Any help or pointers would be most greatful...
Many Thanks