Welcome Guest, Not a member yet? Register   Sign In
dynamic route
#3

(This post was last modified: 09-08-2016, 12:01 AM by Tecvid.)

(09-07-2016, 09:25 AM)daveĀ friend Wrote: The short answer is you cannot - at least not in a controller. The router class is the one that consumes the $route array and it does that before the controller is loaded. Because your addition to $route is "in memory" it is gone on the next redirect or link to another page.

You might be able to create a pre_system hook that would add the dynamic route. Look at the "DEFAULT CONTROLLER" section of the main index.php file and the constructor in system/core/Router.php for inspiration on how it might be implemented.

thank u dave friend! i'll check it, hope it'll help me)
Reply


Messages In This Thread
dynamic route - by Tecvid - 09-06-2016, 04:48 AM
RE: dynamic route - by dave friend - 09-07-2016, 09:25 AM
RE: dynamic route - by Tecvid - 09-08-2016, 12:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB