Welcome Guest, Not a member yet? Register   Sign In
Design question - One page for the site = one big controller ?
#4

[eluser]RobertSF[/eluser]
In that case, one controller for all menu options, especially if the project remains small and contained.

One thing you could look into is inheriting from your controller instead of the CI controller. You first setup your one controller with the code that will be common for all other controllers. Let's say you call it My_Controller.

Then you create controllers for each menu option, but you extend My_Controller, not CI_Controller. Like this.
Code:
class  Whatever extends My_Controller {

Of course, you could leave that for a project rewrite, and just finish the project using one controller for now. Smile


Messages In This Thread
Design question - One page for the site = one big controller ? - by El Forum - 09-24-2013, 09:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB