I am creating an interface for ecms. The main goal of the facade is to display html pages based on the content stored in the database.
I have one table per page, each table consists of an xml field with the contents of the page and some metadata. (I decided to store the XML in the database to use the features offered by SQL Server 2008, such as xquery or xsd validation)
I’m thinking how to keep links between pages so that the URL scheme can be changed in the future (I’m not quite sure if this is required).
I have currently defined two types of internal links:
- Normal links are like a tag
<a>surrounded by text. - A list of links with embedded content is like a list of related news (for each item I need to display a headline with a link and a topic)
Currently, I see the following solutions:
for a normal link:
- Store it in an environment with a token, for example:
$PAGE_LINK[unique identifier of the content]
and replace such tokens with the correct links during the rendering phase. (This approach is taken from the Livesite ECMS I worked with) - Save it as
<a href="local://unique identifier of the content">and replace the contents of the href attribute with the appropriate link. - Suppose the URL scheme is static.
and a list of links with embedded content:
:
- ? CMS, : Drupal, Joomla, N2, Wordpress ..? ?