Page templates

CMS controlled Pages are rendered using templates stored within the ~/theme/page directory. Their settings are managed within your theme's Templates JSON Configuration file.

Default template

Themes must include a default ~/theme/page/index.evml template. Most themes will include a number of Page templates, which usually include a template for the site's homepage, contact us page and general information pages.

Page template definitions within ~/theme/config/templates.json may look a bit like the following:

    "page": {
        "index": {
            "title": "Default",
            "path": "~/theme/page/index.evml"

Learn more about Templates JSON Configuration

Editable regions

Evance is not limited to a single editable region. Instead, it sees a page as a template containing zero or more editable regions. This allows web developers to implement a diverse range of web page designs whilst offering areas clients may edit in a consistent and easy-to-use manner. 

How to implement editable regions

The <ev:editable> reference guide

EVML objects for pages

Each page within the CMS will include the following variables in addition to the common global variables.

Page related variables
page Page

Represents a page from the content management system. This object allows you to get access to all settings, assets and properties associated with the page.

Read more about the Page object


Pages, categories and products visited are stored within a recently viewed cookie on the visitor's device. This object provides access to recent activity and allows you to show which articles a user recently viewed. 

Read  more about RecentlyViewed

Cookies used by Evance

filters Array

Contains an array of active filters represented as an Object. These include filters such as tag, author or archive date. The information within filters includes the filter title, type and value. 

template Template

May also be access via page.template. Provides access to information about the page's template settings.

Read more about Template


Try the dump() function

If you ever get stuck, or would like to know which variables are available to you, try adding the following code into any template. You will be provided with a list of all variables on the page.

{{ dump() }}

Learn more about debugging

Further reading

Adding author information

How to add author information to your pages

Adding breadcrumbs

How to add breadcrumbs to your page templates.

Editable regions

Adding and understanding content editable regions on page templates

COVID-19 NOTICE – Business as Usual
Evance continues to provide all services and support throughout this difficult period. See our full statement here