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.

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

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
<main>
    <ev:editable ref="primaryContent" />
</main>
<section>
    <h2>Features</h2>
    <ev:editable ref="features" />
</section>

Avoid boilerplate content

Product categories have different requirements to pages managed within the CMS. As a result, you should avoid adding boilerplate content in editable regions for primary and secondary content regions.

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:editable>
<?ev } ?>

Additional reading

See the following related articles: