Widget Blocks

Editable widget blocks allow you to separate your pages HTML code and content. You may add any number of widget blocks on a page or partial and then edit them separately from the page code, in WYSIWYG or text mode. The benefit of this approach is that content can be managed by non-technical people. It protects pages from being corrupted by accident and makes page editing simpler.


Adding a Widget Block

The only required field when creating a widget block is the code. This code is used when referencing the widget block in the Twig code.


There are two different types that can be selected when creating a widget block.

  1. html
  2. text

The html option will format the input into valid HTML syntax. The text option is just plain text, also known as "rich text".

Using Widget Blocks

Widget blocks can be added to templates, pages or partials using the code in the widget_block tag.

{{ widget_block("home-about") }}      

You can read more about embedding widget blocks with shortcodes here.