Welcome Guest, Not a member yet? Register   Sign In
Get and Override Default Controller Programmatically
#7

[eluser]NeoArc[/eluser]
[quote author="NeoArc" date="1343832379"]You can access the variable anytime using:

Code:
$route['default_controller'] = "Blog";  
define('DEFAULT_CONTROLLER', $route['default_controller'] );

If you want to edit it before calling the controller you can do it overriding the CI_Router class. [/quote]

I posted this code before, I hope it will be useful if you know how to use constants.


Messages In This Thread
Get and Override Default Controller Programmatically - by El Forum - 07-31-2012, 04:42 PM
Get and Override Default Controller Programmatically - by El Forum - 08-01-2012, 07:46 AM
Get and Override Default Controller Programmatically - by El Forum - 08-01-2012, 07:53 AM
Get and Override Default Controller Programmatically - by El Forum - 08-01-2012, 10:13 AM
Get and Override Default Controller Programmatically - by El Forum - 08-01-2012, 01:10 PM
Get and Override Default Controller Programmatically - by El Forum - 08-01-2012, 01:42 PM
Get and Override Default Controller Programmatically - by El Forum - 08-01-2012, 01:51 PM
Get and Override Default Controller Programmatically - by El Forum - 08-01-2012, 02:00 PM
Get and Override Default Controller Programmatically - by El Forum - 08-01-2012, 02:08 PM
Get and Override Default Controller Programmatically - by El Forum - 08-01-2012, 02:12 PM
Get and Override Default Controller Programmatically - by El Forum - 08-01-2012, 02:17 PM
Get and Override Default Controller Programmatically - by El Forum - 08-01-2012, 02:24 PM
Get and Override Default Controller Programmatically - by El Forum - 08-01-2012, 02:28 PM



Theme © iAndrew 2016 - Forum software by © MyBB