Skip to main content

HTML pages

The headless approach involves focusing on the content rather than its representation on the touchpoint, so that it is easier to represent the same content on different touchpoints.

However, in some cases it is useful to have the ability to compose an HTML page as you would have done with a traditional CMS. This is the case, for example, of articles or blogs or information pages that have a very variable structure that would be inconvenient break into many components.

In this regard, with the Discovery CMS it is possible to use an "advanced HTML editor" type of field which allows authors to write a rather complex page in HTML, thus following a classic approach. This HTML page will be delivered, like all other content, via API. The frontend application will be responsible for presenting the HTML. For example, if your frontend application is in React, you can display raw HTML using dangerouslySetInnerHTML:

     <div dangerouslySetInnerHTML={{__html: {page.data.html} }} />