Welcome Guest, Not a member yet? Register   Sign In
Best Practice for view templates?
#2

[eluser]steelaz[/eluser]
Instead of:

Code:
$data['page']='volunteers/add_profile.php';
$this->load->view('template', $data);

do this:

Code:
$data['page'] = $this->load->view('volunteers/add_profile', '', TRUE);
$this->load->view('template', $data);

It will load volunteers/add_profile.php into the string, you can also pass data to it like with all views.


Messages In This Thread
Best Practice for view templates? - by El Forum - 09-29-2009, 09:06 AM
Best Practice for view templates? - by El Forum - 09-29-2009, 09:32 AM
Best Practice for view templates? - by El Forum - 09-29-2009, 09:37 AM
Best Practice for view templates? - by El Forum - 09-30-2009, 02:41 AM



Theme © iAndrew 2016 - Forum software by © MyBB