Reputation: 1709
We are developing a CMS. This will have a template system, so for example, if the admin wants to add a news section, then he will have to create a template for that section, and another one for each news, that is, for instance, /news/:int:/:title:/, but that route will be stored at the database... how can I do it?
Upvotes: 0
Views: 112
Reputation: 1356
You could use a common controller as a fallback route so that it catches all routes that the admin might create. This controller then goes on to read the appropriate template and show the data.
Upvotes: 1