An embed code from another service
A widget from another service (a booking form, a feed) that comes as a piece of HTML.
Life cycle: Build, example 10 of 35. Worked out on the Fit & Healthy site of Exponential 6.0.15+.
Contents
In the Layouts editor
- Open Layouts > Layouts and the layout Landing Page / Home; the editor opens it in a draft.
- Open the block palette (+ at the top left) and drag HTML snippet (group Basic) into the zone
main. - Select the block, open the Design tab and fill Raw HTML.
- Publish layout. The pages that use the layout show the block on their next view.
The HTML is printed as it is. Only give the editor role this block when the people using it may publish raw HTML; scripts in it are subject to the site's Content Security Policy.
With templates
- Put the code in a template of your design extension (for example a template block template), where it is reviewed with the code.
Which to choose
One-off embeds by trusted editors: the block. Anything that runs on many pages or loads scripts: a template.
Check
- The widget appears and the browser console shows no Content Security Policy errors.
Related pages
- Your own template blocks
- Build examples, every page
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
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.