Welcome Guest, Not a member yet? Register   Sign In
Include controller within controller
#1

[eluser]variouspixels[/eluser]
I have a fairly simple website setup at present. My contacts page is more complicated than my other static pages and I have created a seperate form controller for this which works. How do I include my form controller into my contacts page? I know I can paste the code in from my other controller but I want to keep them separate.

Also, /form has a page of its own I do not want this form controller should only churn out a contacts_view.php include.

Noob here, I guess this is a simple question. Hope the question makes sense.

Code:
class Site extends Controller {

    function index() {
    $data = array();
        $data['title'] = 'Home';

        $this->load->view('header_view', $data);

        $data = array();
        $this->load->view('index_view', $data);

        $data = array();
        $this->load->view('footer_view', $data);
    }

    function about( // like above )...
    function events( // like above )...
    function services( // like above )...
    function contacts( // alot of code to paste in from my working controller. messy I want to keep separate controller )

}


Messages In This Thread
Include controller within controller - by El Forum - 06-09-2010, 09:26 AM
Include controller within controller - by El Forum - 06-09-2010, 09:36 AM
Include controller within controller - by El Forum - 06-09-2010, 09:57 AM
Include controller within controller - by El Forum - 06-09-2010, 10:02 AM
Include controller within controller - by El Forum - 06-09-2010, 11:12 AM
Include controller within controller - by El Forum - 06-09-2010, 11:30 AM
Include controller within controller - by El Forum - 06-09-2010, 11:45 AM
Include controller within controller - by El Forum - 06-09-2010, 11:52 AM
Include controller within controller - by El Forum - 06-09-2010, 11:56 AM
Include controller within controller - by El Forum - 06-09-2010, 11:58 AM



Theme © iAndrew 2016 - Forum software by © MyBB