CodeIgniter Forums
partial views - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: partial views (/thread-53602.html)



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