CodeIgniter Forums
partial views - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: partial views (/showthread.php?tid=53602)



partial views - El Forum - 07-31-2012

[eluser]diasansley[/eluser]
currently the views are being loaded from the controller like shown below

Code:
$data = array(
            'user' => $this->users_model->get($id),
            'current_user' => $this->current_user
        );

        $data['content'] = $this->parser->parse($this->admin_folder . '/users/_show', $data, TRUE);
        $this->parser->parse($this->admin_folder . '/layouts/default', $data);

the layout/default has a call to the header and footer in-turn.


how do I write a partial view for the above code.

Thanks