Welcome Guest, Not a member yet? Register   Sign In
First CI site -> Question regarding controllers for pages
#2

[eluser]crumpet[/eluser]
you can call views from within views
so you can have a view file called "loader.php" which calls hte header, and then the nav, and then the content and then the footer etc...
i usually make a function in my controller like this
Code:
function _run($view){
$this->template['module'] = $view;
$this->load->view('loader');
}
Code:
//loader.php
$this->load->view('header');
$this->load->view('nav');
$this->load->view($module);
$this->load->view('footer');

Then the functions in my controller don't call $this->load->view() instead tehy call $this->_run()


Messages In This Thread
First CI site -> Question regarding controllers for pages - by El Forum - 10-10-2008, 07:01 PM



Theme © iAndrew 2016 - Forum software by © MyBB