Welcome Guest, Not a member yet? Register   Sign In
helper or library?
#3

[eluser]Colin Williams[/eluser]
You can use get_instance() in a helper, too. I put a lot of these view-related functions in a views_helper or theme_helper.

Code:
function list_items($row, $data, $return = TRUE)
{
  $ci =& get_instance();
  $ci->table->set_heading(array_keys($row));
  return $ci->load->view('list', $data, $return);
}


Messages In This Thread
helper or library? - by El Forum - 09-28-2009, 03:53 PM
helper or library? - by El Forum - 09-28-2009, 05:50 PM
helper or library? - by El Forum - 09-28-2009, 06:21 PM



Theme © iAndrew 2016 - Forum software by © MyBB