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

A custom widget only a developer can build

Anything the block types cannot do (a calculator, a data feed) is a template; the Template block lets editors place it.

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/build-two-ways/examples/build/custom-widget-template-block.md

On this page

A custom widget only a developer can build

A "calories per workout" table computed from content, placed by editors where they want.

Life cycle: Build, example 34 of 35. Worked out on the Fit & Healthy site of Exponential 6.0.15+.

Contents

  1. With templates
  2. Then in the Layouts editor
  3. Which to choose
  4. Check

With templates

  1. Write extension/mysite/design/media/templates/explayouts/tpl_block/calories_table.tpl in your design extension, clear the template cache, and place it with a Template block whose Template name is calories_table (Your own template blocks).
  2. Fetch the data and compute in the template, or add a template operator in your extension for real logic.

Then in the Layouts editor

  1. Open Layouts > Layouts and the layout Landing Page / Home; the editor opens it in a draft.
  2. Open the block palette (+ at the top left) and drag Template block (group Placeholders) into the zone main.
  3. Select the block, open the Design tab and fill Template name calories_table.
  4. Publish layout. The pages that use the layout show the block on their next view.

Which to choose

This is where the two ways meet: code by the developer, placement by the editor.

Check

  • The block reads "Template block: calories_table" in the editor, and the site shows the table.

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