![]() |
Modular Extensions - Version 4.3 - 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 - Version 4.3 (/showthread.php?tid=6550) |
Modular Extensions - Version 4.3 - El Forum - 03-04-2008 [eluser]wiredesignz[/eluser] @yingyes: The CI library issue is resolved in 4.0.5 Thanks ![]() The loader should already be able to scan directories for files such as "home/home_page/home_page_a" Modular Extensions - Version 4.3 - El Forum - 03-04-2008 [eluser]Avatar[/eluser] nope, sorry. to load a sibling module I have to do this down the tree. Code: 'content'=>modules::run('home/modules/home_page/modules/home_page_a/home_page_a',$data), NOTICE: home is a module, home_page is a module within it and home_page_a is one with in home_page In directory structure as well. for the views directory in each and every module i created a ln in the file system to point to my smarty templates folder and its great. I prefix all smarty tpl files with tpl_ and ci no prefix and it will load all module views from tepmlates when using ci parser or if you have environment variable set with the path to the templates you can load them via $this->load->module->view. This is AWESOME....Thanks. Modular Extensions - Version 4.3 - El Forum - 03-04-2008 [eluser]Avatar[/eluser] Hence, that is why I needed that $_parent variable What is the best way to access that by the way? This is so awesome after this thing is done you will only need to work in the modules and templates directories(respectively) I have a question from before as well about check module directory structure and create if it doesn't exist(if module not exist create directory within this current module or parent for module name and within in create config,controllers,models,helpers,views, and best for last modules) that can actually be controlled from a config file whether to create directory structure or not. The reason why I want this I guess is because I see potential for this lib with being able to create templated modules on the fly. Do you think this is good? Thanks you. Modular Extensions - Version 4.3 - El Forum - 03-04-2008 [eluser]wiredesignz[/eluser] I would not want to make the loader slower by interpreting nested module directories, anything under a module should be its controllers, liraries and views etc. Maybe you need to review your structure. ![]() I see you still use $this->load->module->view(), this is deprecated, Please try to use $this->load->view() or your scripts will not work in a future version. Modular Extensions - Version 4.3 - El Forum - 03-04-2008 [eluser]Avatar[/eluser] ok, I will use $this->load->view Modular Extensions - Version 4.3 - El Forum - 03-04-2008 [eluser]Avatar[/eluser] wait, so all sibling modules file should be not in directories but just in the module directory alongside with another sibling modules directory? Quote:Maybe you need to review your structure. raspberryyes, I do. I'm just working on it as I go I figure out what is the best way. Modular Extensions - Version 4.3 - El Forum - 03-04-2008 [eluser]wiredesignz[/eluser] I am not sure others will want to nest modules this way yingyes, plus it adds time to loading if we need to search this deep, especially when you know where the module is already. The best way is to consider that a module is a self contained component (mini application). Anything under it, is a library, not a module. Modular Extensions - Version 4.3 - El Forum - 03-04-2008 [eluser]badgeek[/eluser] thanks wiredesignz its work now, i have another problem when loading module controller i place it in application\modules\search_module\search_module.php i think this is missed in loading sequence because when im loading it Unable to find the requested file: search_module/controllers/search_module.php thanks Modular Extensions - Version 4.3 - El Forum - 03-04-2008 [eluser]Avatar[/eluser] badgeek: can I see your code? how are you loading it? Modular Extensions - Version 4.3 - El Forum - 03-04-2008 [eluser]badgeek[/eluser] on controller Code: function _remap($value) thanks |