CodeIgniter Forums
how to separate "core" app files from site-specfic app files. - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: how to separate "core" app files from site-specfic app files. (/showthread.php?tid=25782)



how to separate "core" app files from site-specfic app files. - El Forum - 12-24-2009

[eluser]Jayson Ng[/eluser]
hello and happy holidays!

I'm trying to look into how I can split "core" custom app files that I re-use on every site I create with codeigniter (custom helpers, libraries, models) from site specific files.

i.e.
/application
-----/core
-------/libraries
-------/helpers
-------/models
-----/config
-----/controllers
-----/helpers
-----/etc etc

I'm thinking of creating a core subfolder within the applications folder that house files I re-use. My question is how do I get codeigniter to check within my "core" subfolders as well when loading helpers, models and libraries?

I've been looking into maybe extending the codeigniter library "Loader" -(creating MY_Loader).

am I in the right direction? is there a library already doing this that I can't find/know about?

thank you very much! Smile


how to separate "core" app files from site-specfic app files. - El Forum - 12-25-2009

[eluser]n0xie[/eluser]
Wouldn't it be easier to symlink all the libraries/helpers/models you tend to re-use towards one folder (usually called libs) ?