Editable regions for Products

Evance has one reserved editable region for Product templates, but you may add more if you wish.

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

Product "full description" content

Your Product template must include a fullDescription region.

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

Additional regions

You may add any number of additional sub-regions to your product 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="fullDescription" />
</main>
<section>
    <h2>Features</h2>
    <ev:editable ref="features" />
</section>

Placeholder content

Products have subtly different editable region requirements to Page Templates. You should avoid adding placeholder content in editable regions for the fullDescription region. 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 product. The ref attribute for an <ev:editable> tag supports basic use of EvScript (output tags only), allowing you dynamically name references.

<?ev for (var asset of product.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: