Hello.
I’m working on a web site, or rather web app. WordPress “pages” are stored in the database by default. However, I would like to accomplish a similar routing as in Rails or Laravel. At least have a single place of truth for page premalinks. It would be nice if I could print page’s permalink in the navigation template on the site instead of having to write it manually, hoping it won’t change in the future.
A solution could be to create a map between a name of the page and its permalink as a PHP variable and use that in the templates. The problem is that there are still two places where permalinks are defined for a single page: DB and the PHP variable. Not very good.
I know this is more of a WordPress related issue but from what I can observer, there is a lot of smart developers on these forums, so I’m asking here.