Category templates

Templates for product categories are maintained within the ~/theme/category directory and their available properties are managed within your Templates JSON Configuration file.

Default template

Themes must include a default ~/theme/category/index.evml template. However, you may add additional Category templates where a store may have different departments, for example. Most themes come with just the default template available.

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

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

Learn more about Templates JSON Configuration

Editable regions

Similarly to Page templates, Category templates support multiple editable regions. However, Category does have two reserved regions:

  • primaryContent
    Represents the main content for the category.
  • secondaryContent
    A category sometimes has secondary content, which is usually placed below product listings. Or, as "read more" from the primaryContent (above).

You may add any number of additional editable regions to a category template.

Adding editable regions to your template

The <ev:editable> reference guide

EVML objects for categories

Each product category within Evance will include the following variables in addition to the common global variables.

Category related variables
category Category

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

Read more about the Category object


Type an Array of CategoryFilter objects
Contains an array of product category filters in the same order specified by the website's administrator. These include manufacturer, specification and price filters.

Learn more about CategoryFilter objects


Type ProductCollection of Product objects
Contains products associated either directly to the current category or within the category's tree hierarchy when filters are applied to the page.

Learn more about Product objects


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

template Template

May also be access via category.template. Provides access to information about the category 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

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