Editable regions for Categories

Evance has two reserved editable regions for Category templates, but you may add more if you wish.

Editable regions are added to a page using the <ev:editable/> tag

Primary & secondary content areas

Your Category template must include a primaryContent region and may optionally include a secondaryContent region, which is usually placed either below product listings or as a "read more" to the primary content.

    <ev:editable ref="primaryContent" />
    ... product listsing, or
    <ev:editable ref="secondaryContent" />

Additional regions

You may add any number of additional sub-regions to your category templates. You have freedom over what you call your regions, but references should:

  • contain alpha-numeric characters, dashes or underscores
  • avoid the use of spaces
    <ev:editable ref="primaryContent" />
    <ev:editable ref="features" />

Placeholder content

Product categories have subtly different requirements for editable regions to those in Page templates. As a result, you should avoid adding placeholder content in editable regions for primaryContent and secondaryContent regions. However, additional editable regions on the page may contain placeholder content. 

Dynamically generated regions

There may be instances where you need to dynamically generate editable regions for a category. The ref attribute for an <ev:editable> tag supports basic use of EvScript, allowing you dynamically name references.

<?ev for (var asset of category.assets) { ?>
    <ev:editable ref="asset-{{ asset.id }}">
        <h3>{{ asset.title }}</h3>
        <p>{{ asset.description }}</p>
<?ev } ?>

Additional reading

See the following related articles:

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