Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

How a block maps to its templates

The connection between a block in the Layouts editor and the files that render it - block definition, view type, item view type, the media design's dispatch templates and the standard fallback - with the table of every…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/build-two-ways/block-to-template-map.md

On this page

How a block maps to its templates

Every block you see in the editor is drawn by templates. Knowing which ones lets you change any block's markup, for every page at once, without touching the layouts.

Contents

  1. The chain
  2. Where each block type is rendered
  3. View types and item view types
  4. Override one
  5. What the block header in the editor tells you

The chain

For a page with a layout, on the media design (paths below extension/sevenx_themes_media/design/media/templates/):

StepTemplateDoes
1pagelayout.tplresolves the page's layout and includes explayouts/layout.tpl
2explayouts/layout.tplplaces zones header before <main>, footer after it, the rest inside
3explayouts/zone.tpl<section class="zone zone-<identifier>">, one include per top-level block
4explayouts/block/block.tplthe wrapper <div class="ngl-block ngl-<type> ngl-vt-<view type> ...">, spacing, background, CSS class and ID, container; then includes step 5
5explayouts/block/<block type>.tplthe block itself
6explayouts/block/<block type>/<view type>.tplfor block types whose template dispatches by view type (List, Title, Gallery ...)
7content/views/<item view type>/...how each item of a list is shown

If the media design has no explayouts/block/<block type>.tpl, the next design in line answers: Layouts' own extension/explayouts/design/standard/templates/explayouts/block/<block type>.tpl.

Where each block type is rendered

Block type (editor name)Media designDispatch by view type
title (Title)explayouts/block/title.tpltitle/: title, title_centered, centered, section, section_centered
list (List)explayouts/block/list.tpllist/: list, grid, grid_featured, list_zigzag, list_accordion, numbered, zigzag, accordion, mini, running, eatwell (plus list_items.tpl; the grid by columns in list/grid/: 2_columns, 3_columns, 4_columns, 6_columns)
gallery (Gallery)explayouts/block/gallery.tplgallery/: slider, grid_gallery, thumb_gallery, sushi_bar
column (Column), two_columnscolumn.tpl, two_columns.tpleach child block through explayouts/block/block.tpl again (nested)
tpl_block (Template block)tpl_block.tplby template name, see Your own template blocks
button, rich_text, html_snippetbutton.tpl, rich_text.tpl, html_snippet.tpl
exp_component_hero, _about, _features, _lead, _logos, _quoteexp_component_<name>.tplview types <name>_style_1 ...
product_highlightproduct_highlight.tpl
every other type (text, image, map, card, alert, tabs ...)not in the media designLayouts' standard design: extension/explayouts/design/standard/templates/explayouts/block/<type>.tpl

The block types and their view types are defined in extension/explayouts/settings/explayouts.ini.append.php ([BlockDefinition_<type>], ViewTypes[]).

View types and item view types

  • The view type (Design tab, View type) picks the block's own look; on the media design it names the dispatch template of step 6 and appears as ngl-vt-<view type> on the wrapper.
  • The item view type (Design tab, Item view type, for lists: Standard, Standard (with intro), Overlay, Card, Card (with intro), Line, Mini, List item, List item (with intro)) picks how each item is drawn, from the content views under content/views/ (standard, overlay, card, line, mini, listitem ...).

Some blocks imported with the theme carry view types that their INI definition does not list: the Prefooter's Title uses section_centered while [BlockDefinition_title] lists only default. The template still exists and renders them.

Override one

Copy the template to the same path in your own design extension and change the copy, for example the grid of the List block:

extension/sevenx_themes_media/design/media/templates/explayouts/block/list/grid.tpl    the theme's
extension/mysite/design/media/templates/explayouts/block/list/grid.tpl                 yours (wins)

Then clear Template & content. Every List block in grid view on every layout uses your copy. Setup and the extension order: Your own design extension.

What the block header in the editor tells you

Each block in the editor has a header such as GRID List or SECTION_CENTERED Title: the view type in capitals, then the block type's name. Those two give the template path directly: List in grid view is explayouts/block/list/grid.tpl.

The Prefooter in the editor: the headers read COLUMN Column, SECTION_CENTERED Title and GRID List
The Prefooter in the editor: the headers read COLUMN Column, SECTION_CENTERED Title and GRID List

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x