Welcome Guest, Not a member yet? Register   Sign In
Calling a controller from inside another controller
#1

[eluser]louis w[/eluser]
Can you call/pass the request along to another controller while you are inside of a controller?
#2

[eluser]nmweb[/eluser]
Search the forums for Modular Extensions by wiredesignz
#3

[eluser]louis w[/eluser]
You mean HMVC? I think this is too complicated for what I am trying to do. I do not need that much separation. Something like $this->load->controller('page'); is what I am looking for.

[quote author="nmweb" date="1208982165"]Search the forums for Modular Extensions by wiredesignz[/quote]
#4

[eluser]webthink[/eluser]
redirect('page');
Is that what you mean?
#5

[eluser]nmweb[/eluser]
[quote author="louis w" date="1208982363"]You mean HMVC? I think this is too complicated for what I am trying to do. I do not need that much separation. Something like $this->load->controller('page'); is what I am looking for.

[quote author="nmweb" date="1208982165"]Search the forums for Modular Extensions by wiredesignz[/quote][/quote]

I see what you mean. For another framework I wrote something to do that. In CI you might want to code a method to help you or manually include the controller and try instantiating it. Might lead to problems though, I'm not sure.
#6

[eluser]wiredesignz[/eluser]
Unfortunately CI only allows a single Controller instance, if you need a quick fix use a library instead. You might even like this: http://ellislab.com/forums/viewthread/77031/
#7

[eluser]louis w[/eluser]
Ok, I will check it out.




Theme © iAndrew 2016 - Forum software by © MyBB