modules in CI? |
[eluser]Reynolds[/eluser]
it's been a long while, since I ask a question here at the forum ![]() when I came here at the forum, my question was to why would I use CI, and what are its pitfalls... still I end up using it... for a long while now ![]() Now, I happen to hit a project which will include multiple modules. I said "modules" as part of single-website (and same database), but independent to other modules (e.g. tables, and libraries, resources like images, js, and css). I'm trying to find a way how to do just that with CI. However, I seem to not found it.... yet. I would like one controller, on its own folder, along with a /view/ and /resources/ folders inside it. For example. I would like an "Inventory" Module; /index.php /system/ /modules/ <---- this is where I would like to put all modules /modules/inventory/ /modules/inventory/views/ /modules/inventory/resources/ /modules/inventory/resources/images/ /modules/inventory/resources/js/ /modules/inventory/resources/css/ /modules/inventory/resources/includes/ the module(s) shares the same database, sessions, etc of the entire application. Also I would like to implement an autoloading of this modules. If a module is found within the /modules/ folder it will automatically load, and show it at the main workspace or dashboard as many calls it that way. I looked at scaffolding, it seems similar to what I' thinking, coz it have its own and independent views, controller, and resources. But, before I destroy my copy of CI, I would really love to get the proper know-how for this. Thanks ![]()
[eluser]sikkle[/eluser]
I think the only thing you need for that is to go into the wiki and forum, and look for modular extension. This is what it does. good luck!
[eluser]Reynolds[/eluser]
my GOD! thank you Sooo much, after a few tries on some modular extension, i found MatchBox, more in a very little effort. http://code.google.com/p/matchbox/
[eluser]wiredesignz[/eluser]
When you have finished playing with Matchbox, take a look at Modular Extensions (see my signature) it has many additional features to help you work better with modules.
[eluser]Reynolds[/eluser]
oh my GOSH!!!, now with matchbox, how do i use view and models?
[eluser]Reynolds[/eluser]
controller (sample.php) Code: <?php view (sample_view.php) Code: <html> when i load the module, this is what happened Code: A PHP Error was encountered
[eluser]Reynolds[/eluser]
nevermind.... i changed to "Modular Extensions - HMVC" -- now im able to load views as well... now to test other resources...
[eluser]wiredesignz[/eluser]
Good choice. Don't forget to initialize your controllers Code: <?php |
Welcome Guest, Not a member yet? Register Sign In |