![]() |
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 - 03-01-2008 [eluser]gerben[/eluser] It would be great if the value for MODBASE could be an array. I'd like to create several types of modules (modules, widgets, site-parts), which all have their own folders. Would that be possible? Maybe you can add a config file to the config directory, where the user can configure how he or she wants to use it. Maybe that would also solve Edemilson's problem, because that could be set as a config variable too. Though personally I really like the fact that modules are small self-containing packages that you can drop in or take out. Modular Extensions - (HMVC) - Version 3.1.9 - El Forum - 03-01-2008 [eluser]wiredesignz[/eluser] I'm thinking you could save a copy of modules_helper.php as widgets_helper.php and change MODBASE and the class name appropriately. Then you have the best of both worlds. Modular Extensions - (HMVC) - Version 3.1.9 - El Forum - 03-02-2008 [eluser]wiredesignz[/eluser] Current Version is 3.1.9 Improved module instantiation methods. Altered load->module->view to return TRUE unless directed otherwise. Added class checking prior to module load to prevent duplicate class name being used in different modules. Improved modules loader to scan module directories when looking for module. ie: scan for a_module.php Code: application/modules/a_module.php Modular Extensions - (HMVC) - Version 3.1.9 - El Forum - 03-02-2008 [eluser]jbowman[/eluser] Nice work. Just started writing code on my site this afternoon and decided to give this a try. It's working out perfectly for what I was most interested, being able to call controllers from other controllers. My first implementation is a layout module, that is allowing me to do things like this Code: function index() Then a view like this Code: <?=$header?> Hello partials ![]() The only thing I notice me doing out of the norm is not storing my models in the modules. I kind of feel those belong in a place available to all controllers. Modular Extensions - (HMVC) - Version 3.1.9 - El Forum - 03-02-2008 [eluser]sikkle[/eluser] wait wait wait, are you telling me, that i can call by example in my view, load module whatever, so the controller from this module will do entire cycle, send the view and the view continue to be display ? like a 100% stand alone partial ? i'm right ? thanks. Modular Extensions - (HMVC) - Version 3.1.9 - El Forum - 03-02-2008 [eluser]wiredesignz[/eluser] Thanks jbowman. ![]() There's no requirement to store models in module directories. Its up to the developer. @sikkie: Yes HMVC controllers as partials. But wait theres more... Version 4.0.0 is a complete rewrite, faster and smaller, there is no need to use $this->load->module->whatever, anymore $this->load->normal works in modules just like is does elsewhere. If you have a model in application/models the loader will find it and use it in your module also. Version 4.0.0 is a few hours away yet. Thansk for your interest. Modular Extensions - (HMVC) - Version 3.1.9 - El Forum - 03-03-2008 [eluser]wiredesignz[/eluser] As an after-thought jbowman, why not do this: Code: // 'admin/main' view Modular Extensions - (HMVC) - Version 3.1.9 - El Forum - 03-03-2008 [eluser]sikkle[/eluser] Wireddesignz : ME and the community will enjoy you write a little tutorial about totally separate stuff calling partial. Let's say you have the basic application, in your view at some place you want to grab last ten user connected to the website, so you will be able directly in the view to call <?= modules::run('modulenamer', '', 'controller ?') ?> Something like that ? thanks! Modular Extensions - (HMVC) - Version 3.1.9 - El Forum - 03-03-2008 [eluser]jbowman[/eluser] [quote author="wiredesignz" date="1204545833"]As an after-thought jbowman, why not do this: Code: // 'admin/main' view Mainly just preference. eventually that layout module will handle data such as sessions, or which header to show, etc etc. Those functions really will be controllers, not just shortcuts to views, so I think they should be called from the main controllers. The site I'm working on will have some ajax, so some controllers will make the determination whether it needs use the layout module at all. Modular Extensions - (HMVC) - Version 3.1.9 - El Forum - 03-03-2008 [eluser]wiredesignz[/eluser] [quote author="sikkle" date="1204572072"]Wireddesignz : ME and the community will enjoy you write a little tutorial about totally separate stuff calling partial. Let's say you have the basic application, in your view at some place you want to grab last ten user connected to the website, so you will be able directly in the view to call <?= modules::run('modulenamer', '', 'controller ?') ?> Something like that ? thanks![/quote] You would create a module something like this: Code: <?php |