_theme_view()
- Single Page
Posted 02 May 2012 - 09:12 AM
I would like to make this function, use the default load->view() function from codeigniter... if you send it the second parameter to true, you can have the view in a string format, exactly the same way you are doing it in the _theme_view function...
or is there a reason why you don't use this ? I think it uses the exact same mechanism or do I miss something ?
Posted 02 May 2012 - 20:37 PM
[*]the views are called only from the theme that you have choose.
[*]all the views are collected to a string inside the grocery CRUD
[/list]
it is just for internal use that's why I make it private.
So you can simply use codeigniter's view and you can do this:
public function view($view, $vars = array(), $return = FALSE)
{
$ci = &get_instance();
return $ci->load->view($view, $vars , $return );
}
Posted 17 May 2012 - 07:40 AM
I have tried to change _theme_view like this:
public function _theme_view($view, $vars = array(), $return = FALSE)
{
if ($return === TRUE)
{
return $this->CI->load->view("bo/standard/datatables/".$view, $vars , $return);
}
$this->views_as_string .= $this->CI->load->view("bo/standard/datatables/".$view, $vars , $return);
}
but it doesn't work like it should ... ( $CI is declared as global var and it is instantiated in the constructor of the class ... )
any ideas why ?
Posted 17 May 2012 - 13:26 PM