![]() |
Modular Extensions - (HMVC) - Version 3.1.9 - 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 3.1.9 (/showthread.php?tid=6385) |
Modular Extensions - (HMVC) - Version 3.1.9 - El Forum - 02-26-2008 [eluser]Adods[/eluser] is this helper function is to call controller inside another controller or something like that?? so, i can use both matchbox and this helper, right? Modular Extensions - (HMVC) - Version 3.1.9 - El Forum - 02-26-2008 [eluser]Edemilson Lima[/eluser] Yes, the modules are like controllers, they can load their own views and models, but they goes into the "modules" directories, separated from the real controllers. In this version you may not need Matchbox, since you can put your views, models and also controllers into subdirectories under the modules directory. Modular Extensions - (HMVC) - Version 3.1.9 - El Forum - 02-26-2008 [eluser]Adods[/eluser] I have problem when call a model from a module controller. This is my Module Controller : Code: class Adminmenu extends Module { this is my model: Code: class Menu extends Model { and this is my view: Code: class Menu extends Model { and return error : "Fatal error: Class 'Model' not found in C:\Xampp\xampp\htdocs\ci161\system\admin\blocks\adminmenu\models\menu.php on line 2" is there something wrong?? EDIT: i call that module on my controller view Modular Extensions - (HMVC) - Version 3.1.9 - El Forum - 02-26-2008 [eluser]wiredesignz[/eluser] Well your View and your Model appear to have the same code... :lol: Aside from that the error source looks strange. " \system\admin\blocks\adminmenu\models\menu.php on line 2 ” this doesn't make sense as far as a CI application Where have you put your modules, they should be set like this: Code: application/ Modular Extensions - (HMVC) - Version 3.1.9 - El Forum - 02-27-2008 [eluser]Adods[/eluser] No. i have change the modules directory to 'blocks' and i put all script above inside adminmenu directory in blocks folder. and my main controller is like this : Code: class Useradmin extends Controller { this is my main view Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Modular Extensions - (HMVC) - Version 3.1.9 - El Forum - 02-27-2008 [eluser]wiredesignz[/eluser] Well the error says the main CI_Model class cannot be found, have you altered any other Codeigniter file locations? Try loading a Model inside Useradmin Controller see if that works. Modular Extensions - (HMVC) - Version 3.1.9 - El Forum - 02-27-2008 [eluser]Adods[/eluser] No. I haven't. It's still fresh. If I call model from main controller it works normally, but if I call model inside module controller the error appears. I have tried on new copy of CI but it's still error. sorry if my english is bad. ![]() Modular Extensions - (HMVC) - Version 3.1.9 - El Forum - 02-27-2008 [eluser]Adods[/eluser] I've added some lines to your helper and it works :cheese:. here are the changes I've made : Code: class Module I hope you don't get mad because of it. ![]() the problem is, I can't call the function in my model when using model alias. it says that 'getViewableModules' method doesn't exist, the function can only be called using main name. i mean, this call doesn't work: $this->modelalias->method() but this one works: $this->modelname->method() Modular Extensions - (HMVC) - Version 3.1.9 - El Forum - 02-27-2008 [eluser]wiredesignz[/eluser] Yes... the modules->model loader does not load the CI_Model class. I will fix this. please check the wiki soon. ![]() Modular Extensions - (HMVC) - Version 3.1.9 - El Forum - 02-27-2008 [eluser]wiredesignz[/eluser] You are welcome to change anything... if it is a good change I will include it. ![]() |