Closed briandela closed 10 years ago
This is a terrible idea. Why not just wait until you have your information and then add the proper routes?
That could work. The design is to have a route like /offers
. If the db said to prepend it with /{market}/
to make it /{market}/offers
then there should be two routes, with /offers
changing to redirect to /{market}/offers
.
Makes sense to dynamically add the other routes later and then change the behaviour of the initial ones.
It is not a terrible idea, dynamic evaluation at runtime is a very powerful tool. Just as in every design, there are trade offs.
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.
Prior to 6.9.0 we were using the private _parsePath method to dynamically modify a route based on some information in the database.
Essentially, we have a route with a path like this:
/offers
. At application startup/runtime, a check of the database would determine if we need to have this path changed to something like/{market}/offers
.We were doing this in a plugin by determining which routes needed to have the path changes, then changing the
route.settings.path
value and callingroute._parsePath()
.Is behaviour like this still possible in 6.9.0?