Welcome Guest, Not a member yet? Register   Sign In
Implementing a modular file structure within the CI applications folder
#1

[eluser]tinawina[/eluser]
I watched all of the excellent CI screencasts by Elliot Haughin. (You can find them with example files on his site - http://www.filepanda.com - browse "codeigniter"; or find all of the podcasts in working order here: http://www.bambooinvoice.org/img/screencasts/)

In Elliot's third podcast he reorganizes CI a bit. He moves the application folder out of the system folder so that it resides at the same level of system. And then he creates a modules folder in the application folder where he creates individual folders for each module that he's going to have in his web site. Each of the module sub-folders includes it's own view, controller, and model folders - like this:

Code:
/application
   /modules
      /blog  <-- one module with its own MVC
         /controllers
         /models
         /views
      /news  <-- another module with its own MVC
         /controllers
         /models
         /views

I would LOVE to set up my site this way! But I can't get this to work. Elliot changed three files: Loader.php, Router.php in the libraries folder, and Codeigniter.php. He also had done some changes to the routes.php file in an earlier podcast which needs to get set up before you can make this all work. I grabbed his example files which included all of the revised files needed and copied them over to my server. No go.

Has anyone been able to get this or something like it working? Thanks for any insight!
#2

[eluser]esra[/eluser]
There is an another approach similar to Elliot's method called Modular Separation by Zawk. There is an article on the wiki as well as a forum thread. If you do a forum search on modular separation, you should get additional hits.
#3

[eluser]tinawina[/eluser]
YES! Thanks so much! That was easy breezy! http://codeigniter.com/wiki/Modular_Separation/
#4

[eluser]jkevinburton[/eluser]
I was able to do it in CI 1.5.3 but not in CI 1.5.4

if that helps u.. I've since just recreated my app without it.




Theme © iAndrew 2016 - Forum software by © MyBB