PyroCMS: how to share resources between modules?
PyroCMS uses HMVC, so accessing resources from other modules is easy.
Let's say you want to load the model navigation_m
:
This will work from within the navigation
module (where it resides):
$this->load->model('navigation_m');
This will work from anywhere:
$this->load->model('navigation/navigation_m');
That's it! No need to include the model/
path, the loader takes care of it for you. Same applies to language files, libraries, and other resources.