Welcome Guest, Not a member yet? Register   Sign In
Call a controller function from another controller and pass that as view
#1

[eluser]Paleleaves[/eluser]
Hi,

I found something similar topics in the forum but my question is somewhat different.

Code:
$data["login_screen"] = $this->load->view("auth/login", "", TRUE);

// 'auth' is my controller name and 'login' is a function inside that. I've the above statement in a different controller.

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

And i tried to echo $login_screen in my view file it returns an error that login.php not found. 'login' is actually a controller function not the file name. Is it possible to pass function name as view file?

please advise..


Messages In This Thread
Call a controller function from another controller and pass that as view - by El Forum - 06-14-2011, 11:09 AM



Theme © iAndrew 2016 - Forum software by © MyBB