Skip to main content
Geneva, Switzerland Call our support
English

Content type templates

Overriding index, show, taxonomy, lists, and block sections.

Template resolution

Twig resolves templates child-first, then parents, then core. Common paths:

ViewTemplate path
Single entrycontent/{typeSlug}/show.twigcontent/show.twig
Type archivecontent/{typeSlug}/index.twigcontent/index.twig
Taxonomy archivetaxonomy/archive.twig or type-specific variants
Content list pagecontent_lists/{listSlug}.twigcontent_lists/show.twig
Block sectionsections/{sectionKey}.twig

Variables on show.twig

  • content_type, content_entry
  • content_field_rows — Field definitions with values
  • entry_taxonomy_groups
  • content_entry_sections_html — Rendered block builder output
  • content_entry_has_sections
  • SEO variables from meta builder
  • theme_settings, menus, site_url

Rendering entry_refs

{% for row in content_field_rows if row.field_type == 'entry_refs' %}
  <h3>{{ row.label }}</h3>
  <ul>
    {% for ref in entry_refs_resolve(row.value) %}
      <li><a href="{{ ref.public_url }}">{{ ref.title }}</a></li>
    {% endfor %}
  </ul>
{% endfor %}

Embedding content lists

{% set pack = content_list('featured-guides', 4) %}
<div class="card-grid">
  {% for card in pack.entries %}
    {% include 'partials/entry_card.twig' with { card: card } %}
  {% endfor %}
</div>

Commerce products

When the entry is a configured product type, templates receive commerce_product and may include commerce/_buy_form.twig. Hide raw price fields from the field loop when commerce form renders them.

Extend the right layout

{% extends 'layouts/base.twig' %}
{# or {% extends theme_layout() %} #}

Do not extend core base.twig on storefront content templates.

Troubleshooting

  • Wrong template picked — Check type slug spelling; clear Twig cache.
  • Blocks unstyled — Section partials need CSS in theme assets, not core marketing CSS.