<ev:editable>

Define a region on a page where content may be edited within Evance's CMS editor.

Evance allows you to define any number of editable regions on a template. Each is identified by a unique reference scoped locally or globally.

Local scope

A local scope indicates that the content within the region is associated with the current page (Page, Product or Category) either as the full description or as an additional content fragment. For this reason, locally scoped editable regions are supported on Page, Product and Category templates only, and are not supported in layouts.

<ev:editable local ref="fullDescription" />

or

<ev:editable scope="local" ref="fullDescription" />

Global scope

A global scope indicates that the content within the region is identified by the reference site-wide. Therefore, globally scoped content fragments are supported on any template and also within layouts.
<ev:editable global ref="fullDescription" />

or

<ev:editable scope="global" ref="fullDescription" />

Attributes
color

Optional
The default outline representing an editable region within the CMS has a cyan colour. If the default colour does not offer enough contrast to your theme's background you may customise the colour per region. This attribute accepts a hexidecimal colour reference.

global

Optional
Equivalent of scope="global", see scope.

local

Optional
Equivalent of scope="local", see scope.

ref Required

All editable regions require a ref attribute. 

Locally scoped references must be unique to the template and should not be duplicated.

  • Page templates should include an editable region with a ref attribute of fullDescription.
  • Category templates must include an editable region with a ref attribute of primaryContent and optionally an editable region with a ref attribute of secondaryContent.
  • Product templates must include an editable region with a ref attribute of fullDescription.

Page, Product and Category templates may contain any number of additional locally scoped editable regions (as few as possible).

Globally scoped references must be unique site-wide.

References should adhere to the following naming conventions:

  • May contain A-Z, 0-9, -, _characters only.
  • Do NOT include spaces or special characters in your references.
scope

Optional
Sets the scope of the reference.

  • local (default)  indicates that the content within the region is associated with the current page.
  • global indicates that the content within the region is recognised site-wide by the reference.



Template support

The following templates support locally scoped editable regions ( <ev:editable local>):

Placeholder content

Placeholder content is not recommended for locally scoped editable regions, but is better supported by globally scoped regions. 

When creating a template you may include default content per editable region. This helps you experiment with your templates without having to use the CMS editor to edit and preview content. 

For example you could create a page with the following content:

<ev:editable ref="main">
    <h1>Hello, welcome to our store</h1>
    <p>Perhaps you'd like to browse our awesome range of products.</p>
</ev:editable>

This allows you to be a little creative and when your theme is installed for the first time users aren't met with a blank space.

Tag nesting

Do NOT nest other <ev:tags> within an <ev:editable> tag.