Is there a way to call a method inside the controller from our view using codeigniter.I know it is a bad practice but, now I force to do this.Thank you
4
-
3Can't you just refactor the code that is in your view that you need to reuse and put it someplace else? Like in your controller for instance?Matthew J Morrison– Matthew J Morrison2010-06-08 12:41:07 +00:00Commented Jun 8, 2010 at 12:41
-
1It would be interesting to see exactly what you are trying to do.Bella– Bella2010-06-08 12:49:09 +00:00Commented Jun 8, 2010 at 12:49
-
Would also like to know what you are trying to do as this would help with the solutionKieran Andrews– Kieran Andrews2010-06-08 12:50:49 +00:00Commented Jun 8, 2010 at 12:50
-
I need it because I have two views (contract view and invoice) and need the same output from a controllers (contract-invoice) variable in a loop. It seems more logic to have a function in the controller than in the utility helper which is global.Timo– Timo2013-10-14 10:05:48 +00:00Commented Oct 14, 2013 at 10:05
Add a comment
|