One method - many views

#1
[eluser]nws123[/eluser]
How to in one method add many views ?

Code:
public function active()
    {
        $this->load->model('survey_model');
        $this->load->library('auth');
        $this->data = array('survey' =>  $this->survey_model->loadPublished($this->auth->getUser()->userId));
        $this->load->library('design');
        $this->design->header('header_logged');
                //one view i need 4
        $this->load->view('/survey/active',$this->data);
        $this->design->footer('footer_logged');
        
    }

#2
[eluser]xwero[/eluser]
Can you give more information? Are the 4 view parts of one page or are it 4 different contents?

#3
[eluser]nws123[/eluser]
Content from 1 table on 4 pages

#4
[eluser]Sam Dark[/eluser]
Add another 4 methods that are using fifth to get data?

#5
[eluser]alx_benjamin[/eluser]
Do this:

Code:
$this->load->view('header',$this->data);
$this->load->view('body');
$this->load->view('footer');

once loaded $this->data will be accessible within every page (header, body and footer)

Regards


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.