The modern.gov logo

Welcome to the modern.gov reverse CMS tester

Before you begin you should have:

The next few pages will briefly cover some common areas of importance with reverse CMS. At any time you can go to the tester by clicking the 'Go to tester' button.



The modern.gov logo

Using https in this tester

We continue to put security at the front of what we do, as such this tester now runs under https. To be able to use the tester we therefore require template urls and all resources in that template to be referenced as https.

Thank you



The modern.gov logo

ReverseCMS 1.0 and ReverseCMS 2.0

There are currently two versions of the reverseCMS code in general use, version 1.0 and version 2.0, version 1.0 templates are compatible with version 2.0 code, and there is partial compatibility of version 2.0 templates with version 1.0 code. This tester can test both versions but will give information messages where features will not be available or where code is not required.

Version 1.0

If you are an existing customer whose reverseCMS template was created before September 2015 then you will have this code on your server.

A reverse CMS 1.0 template must include a {meta} tag, which inserts our meta data. In version 1.0 menu and breadcrumb styling was done as part of the modern.gov code and so could not be changed without a request to modern.gov support.

Modern.gov is happy to arrange for the version 2.0 code to be applied to your system if you would like to use the new features as part of a rebrand, simply contact support@moderngov.co.uk

Version 2.0

All new customers after September 2015, and existing customers who have had a rebrand since then and have asked for the version 2.0 code will have this version.

This version removes the need to add the {meta} tag in the <head> element of the page. It also allows users to have more control over navigation and breadcrumb styling via the {settings} tag.



The modern.gov logo

URLs for resources and non-modern.gov pages

The most common issue with reverse CMS templates is links to resources. When you are building the template all your resources are local to the template page, so the tendancy is to refer to the resources locally:

<link href="/path/to/resources/styles.css />

This may work in the template, however once the the Modern.gov code has pulled in the html these relative linked resources will be looked for on the modern.gov server. Since they won't be there the page will render without styles and images. Therefore the correct way to reference resources, and links to other pages in your main website is:

<link href="http://www.council.gov.uk/path/to/resources/style.css"

When using the tester if resources appear to be missing check in your browsers webtools for missing resources (returning 404 errors).

Please note you cannot use the <'base /> tag to set a default url path as this will cause the modern.gov links to become based off this url and then they will not work.



The modern.gov logo

The {pagetitle} tag

The {pagetitle} tag normally only needs to be used once in your template within the <title> tag. The tag can be anywhere within the title tag, so for example any of the following are valid:

<title>{pagetitle} - Council</title>
<title>Council : {pagetitle}</title>
<title>Our Council, {pagetitle} - Proud to serve the local community</title>

The {pagetitle} tag may be used any number of times in the page which means that it can be additionally used in <meta> tags or other features of your pages. However the {pagetitle} tag is not needed above the {content} tag. The {content} tag will automatically insert a title on the page. If you include both the {pagetitle} and {content} tags you will get a double heading.



The modern.gov logo

The {sidenav} tag

New Customers

The {sidenav} tag will insert the default set of modern.gov links. New customers are encouraged to use the {sidenav} in the first instance so that they can have access to the most commonly used pages in the system. The default links are also especially useful when the trainers are on site as then they can demostrate the widest range of site features with ease.

Once users are comfortable using the system and decisions have been made as to which links are wanted on the websites you are welcome to copy these links into your template in place of the {sidenav} which will allow you control over the links in the future.

Existing Customers

Existing customers usually have a set of modern.gov pages that they use, these will have been decided previously usually by either the web team or the DS team. Therefore existing customers are encouraged to simply add the navigation links present on their current modern.gov pages to their template. This will allow you to control these links in future.

Customising the {sidenav} (Reverse CMS 2.0 only)

If you are using the {sidenav} you can customise how it is inserted into the page using the special {settings} tag, full details are in the guide which can be found here (username: modern.gov, password: excellent) The default structure of the default {sidenav} is:

<ul>
<li><a href=... >Link Text</a></li>
<li><a href=... >Link Text</a></li>
<li><a href=... >Link Text</a></li>
...
</ul>


The modern.gov logo

The {breadcrumb} tag

The {breadcrumb} tag inserts the last five pages visited within the modern.gov system. It does not include links back to your main pages therefore if you wish to include these you should add them before the {breadcrumb} in the format you want your breadcrumb to appear.

Customising the {breadcrumb} (Reverse CMS 2.0 only)

By default the breadcrumb items are simply inserted as a series of links with no elements before or after them and no dividers this is because almost all customers handle the breadcrumb elements differently it is therefore important to use the {settings} tag to customise the breadcrumb. Full details are in the guide which can be found here (username: modern.gov, password: excellent).



The modern.gov logo

Custom fonts

Most customers host their modern.gov pages on a domain which is not the same as their main domain, such as democracy.council.gov.uk, this is good practice and the encouraged method, and while most resources have no issues being shared across domains custom fonts prove to be the exception.

By default most browsers will not load a font file unless the 'Access-Control-Allow-Origin: *' header is present which allows Cross Origin Resource Sharing, this setting must set on the server hosting the font so the exact method varies between architectures.

A helpful website in this area is http://enable-cors.org.



The modern.gov logo

The template after 'going-live'

Once the modern.gov system has been configured to use your new template it is very important that the template page remains live. This is because the modern.gov pages refer back to the template in order to brand the modern.gov pages, if the template is missing then the modern.gov pages will not be branded.

In the event that a template does become unavailable a default branding with a warning message is displayed:

The default branding with it's warning message

This means that the system will still be usable if the branding is unavailable.



The modern.gov logo

Reverse CMS tester

Once you have a template and an active url you will be able to test it here by entering the url in the box below and clicking 'Continue'.

Which version do you want to test it as?

* Please note the tester uses one cookie which allows you to fold the 'Checks' box up to see any content underneath, if you disable cookies the page should continue to work fine but the 'Checks' box will continue to appear on each page. Any cookies that are set within your template will also be set for the tester page, we have no control over that.