It's simple, fast and would be great if the core developer of grocery crud could implement it.
FYI: I am using the current latest version of grocery crud 1.3.2.
Normally we would write this:
$output = $this->grocery_crud->render(); $this->load->view('template.php',$output);
I propose this(after the changes):
$output = $this->grocery_crud->render($extra); $this->load->view('template.php',$output);
In order to make it happen:
(file: application/libraries/grocery_crud.php)
Step 1 : function render (line:~3822)
public function render($extra = null) { ... return $this->get_layout($extra); }
Step 2 : function get_layout (line:~1825)
protected function get_layout($extra = null) { ... if($this->echo_and_die === false) { return (object)array('output' => $this->views_as_string, 'js_files' => $js_files, 'css_files' => $css_files, 'extra' => $extra); } ... }
And from now on you will be able to pass data to any grocery crud view!!!
Edited by David Olive Tree Oster, 09 November 2012 - 05:51 PM.