Need help with HMVC |
[eluser]edwin87[/eluser]
Hello CI, Im trying to get a Modular Extension: HMVC installed. But i followed the steps on the wiki page. And i can't get a result. Does anyone knows a solution of this? I exactly followed that instructions and still a 404 page. Till step 6 it goes nice. Quote:1) Start with a clean CI install.
[eluser]OES[/eluser]
Ok I had a quick play with this and got it working first time. Quote:1) Start with a clean CI install. Ok so lets break it down. 1-3. Its just a normal CI setup. So do this first and make sure it all works. So we will assume you have a basic setup. 4. Copy Controller.php & MY_Router.php into folder: /system/application/libraries. Copy debug_helper.php & modules_helper.php into folder: /system/application/helpers 5. Just try you site and make sure its still working. 6. Create a folder called modules in: /system/application/ So you will have : /system/application/modules/ Now create your first module so in this example its called welcome. then within welcome create your set of folders for it ie. /system/application/modules/welcome/views/ /system/application/modules/welcome/controllers/ /system/application/modules/welcome/models/ 7. Now move not copy ! /system/application/controllers/welcome.php to /system/application/modules/welcome/controller/welcome.php 8. Recheck site to make sure all is working. 9. Already done with my above step. 10. Now move not copy ! /system/application/views/welcome_message.php to /system/application/modules/welcome/views/welcome_message.php 11. Recheck and it should all be working. Good luck.
[eluser]edwin87[/eluser]
Yes! Finally it works. I see that i can't call a module in this way? cms/modulename/view Normally that works. But do i need to call a module every time like: Code: <?php echo module::run('modulename'); ?>
[eluser]Reynolds[/eluser]
hi, i just installed ME-HMVC, I got it working, but my question though is... why is it that if i called it this way, it works: http://localhost/website/sample/welcome but not http://localhost/website/sample i get an error: Unable to load your default controller. Please make sure the controller specified in your Routes.php file is valid. subdir: /website/ controller:welcome module name: sample I remember I had this working, but I forgot if its HMVC, or other library. I haven't taken a look at my old code, which has the modular library working. I appreciate your help, thanks :cheese:
[eluser]edwin87[/eluser]
I think you're controller must be the same as the name sample. So Controller: sample Module sample |
Welcome Guest, Not a member yet? Register Sign In |