Resolved - Best way to load a package module?
Permalink 1 user found helpful
I have a package that has a model and a single page, i need to call the module inside the single page page but im getting an error when i try the loader inside my single page.
so for now im doing it this way;
is there a more elegant way to do this? do i need in some way install this module when i install the package so i can call it via the Loader? Thanks for any help.
Loader::model('MyModel');
so for now im doing it this way;
Loader::model('package'); $pkg = package::getByHandle('my_handle'); include $pkg->getPackagePath().'/models/MyModel.php';
is there a more elegant way to do this? do i need in some way install this module when i install the package so i can call it via the Loader? Thanks for any help.
Loader::model('package',$pkg);
but don't recall whether that's the package object or just the package handle.