I want to use dynamic routing combined with default controller routing. I have a table "Page" which has a column "url" to which the incoming request url should be checked against. If the url is not found in this table, the default controller routes should be checked.
The ChainRouter should be set in this order:
- Try to match the request url to the "url" column in "Page" table. With the data in that table I know which template to use to return the response.
- Check the default controller routes
I think I need to create a custom dynamic router implementation the search the Page table, this would be the configuration:
cmf_routing:
chain:
routers_by_id:
cmf_routing.dynamic_router: 20
router.default: 10
And then use a custom dynamic routing implementation. But how do I do that?