Welcome Guest, Not a member yet? Register   Sign In
controller from controller - once and for all
#11

[eluser]wiredesignz[/eluser]
Sure, and there is nothing incorrect in loading a class from anywhere, Just don't expect a second controller descendent to act the same as the first controller does. Smile
#12

[eluser]TheFuzzy0ne[/eluser]
Perhaps I'm missing the point here, but what's wrong with a good old fashioned redirect?
#13

[eluser]xwero[/eluser]
The idea of the mihailt’s function is to use the content of another controller in the current controller.
Code:
$other_ctrl = load_controller('othercontroller');
$data['header'] = $other_ctrl->method($this->uri->segment(3));
The wick library makes this possible and HMVC takes it to an whole other level.
#14

[eluser]mihailt[/eluser]
hi guys, i realized where, my code didn't do what i wanted, and i made an extension which allows to work with controllers the same way as libraries and doesn't create more CI instances.
check it out : CLE - Controller Loader Extension
#15

[eluser]rbncha[/eluser]
Wow ! I just loved this. Thanks to the creator of this.




Theme © iAndrew 2016 - Forum software by © MyBB