Welcome Guest, Not a member yet? Register   Sign In
** solved ** dynamic routing from database
#11

[eluser]Tottys Design[/eluser]
[quote author="Colin Williams" date="1258510941"]Advanced routing usually involves overloading the core Router class (creating a MY_Router library). If you take a look at the Router class, it should be pretty clear where you'll want to make your modifications.[/quote]

I can't load models in the Router class because they are loaded only after the controller. I've tried all day to do that and I can't. If someone here can help me, I really appreciate so much your help!
#12

[eluser]Colin Williams[/eluser]
You can load up the DB class manually, but beware you will end up with two connections, adding a bit of overhead to performance.

Code:
require_once BASEPATH.'database/DB'.EXT;
$db = DB();
#13

[eluser]Tottys Design[/eluser]
[quote author="Colin Williams" date="1258519901"]You can load up the DB class manually, but beware you will end up with two connections, adding a bit of overhead to performance.

Code:
require_once BASEPATH.'database/DB'.EXT;
$db = DB();
[/quote]

Thanks so much! Now I'm working on... Thanks!!!
#14

[eluser]Michel-Ange[/eluser]
Quote:So you are saying this:
MY_Controller extends Controller
Core_controller extends My_Controller
and when a request comes, Core_controller loads it and then, how can I load the other controllers the I would need, “gallery”..?

Yes...

(How should I say to you not to polute a thread with a topic wich has nothing to do with ?)




Theme © iAndrew 2016 - Forum software by © MyBB