![]() |
Accessing the $config array in routes.php - 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: Accessing the $config array in routes.php (/showthread.php?tid=48418) |
Accessing the $config array in routes.php - El Forum - 01-16-2012 [eluser]Silviu[/eluser] Hello, I have a site with some SEO friendly URLs that went through several rewrites until now. I have made a library that helps me build the respective URLs where they are needed, and when I need to change something, I change the URL pattern for the library, and then the route definition for that particular URL. I was wondering if there is possible to "read" the $config array from routes.php, so that I can define only one URL pattern that can be used both to build the URL and to define a route. I have a vague memory from my 1.7 days that it is possible, but I cannot remember how. It was something like $config->config[key] or something.... |