Modular Extensions - HMVC version 5.4 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Modular Extensions - HMVC version 5.4 (/showthread.php?tid=38057) |
Modular Extensions - HMVC version 5.4 - El Forum - 04-25-2011 [eluser]wiredesignz[/eluser] @osci, Yes thanks, that will be a Reactor and Core CI version conflict too. Reactor is using protected methods. I will update again to use public methods. Modular Extensions - HMVC version 5.4 - El Forum - 04-25-2011 [eluser]osci[/eluser] Thanks for the info wiredesignz. I am basically using core for my commercial projects. I'll check it there too and repost. The vanilla test was on reactor since I wanted to check my projects on reactor too. I know I might be asking too much but could we have another branch for reactor and another for core? Thanks again for your contributions. Modular Extensions - HMVC version 5.4 - El Forum - 04-25-2011 [eluser]wilso417[/eluser] Hi wiredesignz, was I wrongly extending MX_Lang or is there not a native way to extend that with HMVC? Also, is there a bug with $this->router->fetch_module() not always returning the correct module in different contexts? Modular Extensions - HMVC version 5.4 - El Forum - 04-25-2011 [eluser]eldrinofsoalim[/eluser] Hi! I'm starting to learn HMVC and I really think that it can do wonders. It might be what I need to actually create an admin-member-non-member website. I'm just running encountering a problem. It seems there's a problem with calling HMVC from the view. I'm currently following the Net Tuts HMVC: an introduction and application. Let me explain: Here are the functions: THE CONTROLLER FUNCTION UNDER "LOGIN" MODULE: Code: function cp() and THE VIEW UNDER THE "SITE" MODULE: Code: <!DOCTYPE html> THE PROBLEM: I can't seem to call cp() from the view using <?php echo modules::run('modules/login/cp');?>. It doesn't produce the user_widget. If I change the function called in the view (i.e. <?php echo modules::run('modules/login/RANDOMFUNCTION');?>, it don't get an error. If I remove the "modules" from the path (as in the original code in the article - <?php echo modules::run('login/cp');?>, I get an error: Quote:A PHP Error was encountered Is there something wrong with the code? I followed the guide to the letter except when I had to edit the module::run call from module::run('login/cp') to module::run('modules/cp') to follow the format specified: Quote:Format: modules::run('module/controller/action', $param1, $param2, .., $paramN); Modular Extensions - HMVC version 5.4 - El Forum - 04-25-2011 [eluser]wiredesignz[/eluser] @wilso417, MY_Lang should be located in application/core and should extend MX_Lang. The error with CI_Controller needs to be resolved as a separate issue. MX_Router::fetch_module() returns the name of the last module controller loaded. Modular Extensions - HMVC version 5.4 - El Forum - 04-25-2011 [eluser]wiredesignz[/eluser] @eldrinofsoalim, Don't use the word "modules" use the name of your module. The error with Login::$session needs to be resolved as a separate issue. Modular Extensions - HMVC version 5.4 - El Forum - 04-26-2011 [eluser]wilso417[/eluser] I see, thanks wiredesignz. Is there any easy way to return or have fetch_module() return the last module being 'used' and not just loaded? Modular Extensions - HMVC version 5.4 - El Forum - 04-29-2011 [eluser]pickupman[/eluser] Just pulled the latest changes for Reactor. I had to add another public var to MX/Loader.php Code: public $_ci_classes = array(); Modular Extensions - HMVC version 5.4 - El Forum - 05-04-2011 [eluser]Mr. Pickle[/eluser] Hi Wiredesignz, any way I can have the HMVC modules load when calling them from a view partial, but have them ignore the url? Ideally configurable per module. Modular Extensions - HMVC version 5.4 - El Forum - 05-04-2011 [eluser]wiredesignz[/eluser] @Mr. Pickle, Use modules::run('module/controller/method') to load a module from a view partial and add the _remap() method to a controller where you can manage calls from the URL. Code: class Partial_controller extends MX_Controller |