How to correctly implement the ability to choose the type of link, that is, to be able to change the format of the link, for example, as in wordpress
: url/post/id urp/post/title url/date/title url/title
Whether the correct solution is to make the settings table with the url_pattern string containing, for example, the variant number or the required format. And to make a helper in the application, which will receive the value of the url_pattern
parameter from the database (or from a global variable) and use the case to substitute the necessary link format?