![]() |
[SOLVED] URL dispatcher - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: [SOLVED] URL dispatcher (/showthread.php?tid=33147) |
[SOLVED] URL dispatcher - El Forum - 08-17-2010 [eluser]sirtea[/eluser] Let's supose we have subclassed model of objects object_primary and object_secondary i have a method index in controller objects that generates a menu-dispatcher to subclass options, and a sort of folders with their own controllers Code: /controllers I'm expecting a behaviour like Code: <url>/objects -> objects.php::index() It seems that codeignitere makes a mess with the repeated name of the folder and controller; if you rename one of them it works as expected, althous is kind of ugly. ¿Any suggestion? [SOLVED] URL dispatcher - El Forum - 08-17-2010 [eluser]WanWizard[/eluser] The loader checks first if a controller exists, and if not, if it is a sub directory. And not the other way around. So everything starting with /objects/ will load objects.php, and will ignore the folder. [SOLVED] URL dispatcher - El Forum - 08-17-2010 [eluser]sirtea[/eluser] maybe i could use URI routing in config/routes.php to achieve what i want... Perhaps if the controller has a different name... if the route contains object/primary i could map to object2/primary.php... I will investigate further. thanks! |