The Custom HTML block is only available on websites, not on landing pages.
How the block works
When you select a Custom HTML block in the website editor, the sidebar shows three parts:
In the code editor, Format code tidies the indentation.
1
Add the block
Add a Custom HTML block to a page of your website.
2
Define the fields
Under Field definitions (JSON), click Edit code and list the fields the section needs.
3
Write the HTML
Under HTML, click Edit code and write the markup. Output each field with
{{ block.name }}.4
Fill in the content
Fill in the inputs under Fields. The preview shows the result.
Field definitions
Field definitions are a JSON list. Each entry describes one field:
When a field has no value and no default, the template receives an empty value: empty text,
0 for numbers, false for switches and an empty list for lists.
Field types
Two types need extra properties:
- select needs
options, a list of{ "label", "value" }. Every value must be non-empty and unique. - list needs
fields, the fields of each entry. Lists can’t contain other lists. SetitemLabelto the name of atextfield to use it as the title of each entry in the sidebar.
Example
Field definitions
Using fields in the HTML
The HTML is a Liquid template. Every field is available underblock:
Template syntax
- Output is HTML-escaped automatically, so text fields can’t break your markup.
richtextfields are output as HTML.- Standard Liquid tags and filters work, for example
upcase,dateorsize. include,renderandlayoutare not available.
Filters
Converic adds four filters for its field types:Filters
- asset_url returns the URL of an image field. The alt text you enter in the sidebar is available as
altText. - icon_svg turns an icon field into an inline SVG. Icon names are Lucide names like
shield-check. - link outputs a link field. Only
https://URLs, paths like/contact, anchors like#pricing,mailto:andtel:links pass. Anything else becomes#. - json outputs a value as JSON for use inside a
<script>tag.
Language
{{ language }} contains the language of the section, en or de. You set it under Layout & visibility in the block settings.
Language
Website variables
Website variables like{{city}} only work inside field values, not in the HTML or the field definitions. Type them into a field in the sidebar, for example in the headline.
Design tips
- The page stylesheet only covers the built-in blocks. Put your CSS in a
<style>tag inside the HTML and prefix every selector with a class unique to the section, for example.cx-features h2. - Use the theme variables so the section matches your website:
- Put every text, image, icon and link you may want to change into a field instead of writing it into the HTML.
- Scripts run on the published website. The editor preview runs them in a sandbox.
Limits and errors
- A section can be at most 64 KB.
- Template errors show as a message above the section in the editor preview.
- If a template has an error, publishing stops with a message that names the page and the block, so you can fix it before anything goes live.
Complete example
This feature grid has a headline, a formatted intro, a list of features with icon, title and text, and an optional button.clock icon, “Reliable” with shield-check and “Personal” with users.