ci_bootstrap_3
ci_bootstrap_3 copied to clipboard
Grocery_CRUD in view
Hi. I am having issues with position of CRUD in view. Is there a way to set CRUD inside like this
> <div class="panel panel-default">
> <div class="panel-heading"><h4 class="text-center">Server settings</h4></div>
> <div class="panel-body">
>
> Put crud here ?
>
>
> </div>
> </div>
To use Grocery CRUD within your custom view (instead of /application/modules/admin/views/crud.php), you can simply skip the Admin_Controller's render_crud() function and pass the CRUD object like:
$crud = $this->generate_crud('users');
$this->mViewData['crud'] = $crud; // or use $this->mCrud
$this->render('my_view');
But then you will miss some functions from render_crud(), like you will need to add stylesheets / scripts to page manually - for reference please have a look on the render_crud() function from Admin_Controller.php