Sites

Page templates

Clients can be given the ability to add new pages through the use of templates. In Surreal, a template is nothing more than the HTML code of a page that contains content regions. You can create as many templates as you like for each site.

Once your site has been added to the CMS, you can create a template by selecting Edit Templates from the sidebar. Every template needs a name, a file extension, and some HTML code. The template’s name is what clients will see when they create new pages. The file extension will be appended to each page that gets created using the template. The HTML code should be a full page including a DOCTYPE, an html element with a head and a body, and content regions.

When pages are created from templates, the user is instructed to enter a label. This label is used to reference the page in the CMS and as a basis for generating a filename. For example, the label My New Page will result in a filename of my-new-page.html.

Templates are not dynamic. If you change the HTML of a template, existing pages will not be updated.