If a CMS stores raw HTML, and some anchor links, or their parts (not many but a few of them) might change in the future, what is the preferred approach to store such links? Use some made up syntax/templating like {:something1}, {:something2} and then regex replace these in the future?
Currently I keep the hard coded full URLs and replace parts where they change in the future.
Appreciate it. Is there a preferred syntax, like the one you mentioned, or can it be any sufficiently unique string? I am interested as to why you used the trailing colon symbol.
@developer654079525 It really depends on how that raw HTML is being authored in the first place.
Ideally, yes, you want to remove any hard-coded references to dynamic content. If a user is linking to a page controlled by the CMS, then it’s probably better to store some sort of identifier rather than the URI at that time. You will then need to decide what you do with links to pages that are then deleted entirely, though.