Welcome Guest, Not a member yet? Register   Sign In
basic stuff, include a view in a main php file
#4

[eluser]xwero[/eluser]
I like to use variables that reflect the name of the view file for easy troubleshooting
Code:
class Page extends Controller {
   function index()
   {
      
      $this->load->view('header');
      $menu['links'] = $this->model->urls();
      $this->load->view('menu',$menu);
      $content['page_title'] = 'Your title';
      $this->load->view('content', $content);
      $this->load->view('footer');
   }
}


Messages In This Thread
basic stuff, include a view in a main php file - by El Forum - 03-04-2008, 09:02 PM
basic stuff, include a view in a main php file - by El Forum - 03-04-2008, 09:34 PM
basic stuff, include a view in a main php file - by El Forum - 03-05-2008, 08:00 AM
basic stuff, include a view in a main php file - by El Forum - 03-05-2008, 08:07 AM
basic stuff, include a view in a main php file - by El Forum - 03-05-2008, 10:11 AM



Theme © iAndrew 2016 - Forum software by © MyBB