Review and Summary
Definitions
Widgets
Widgets are the units of content to be placed on specific pages in a Stencil theme. Each widget is comprised of a widget configuration and a widget template. There is a limit of 1000 widgets per store.
Widget Templates
Widget Templates are Handlebars-enabled HTML templates which define the widget’s structure on a page. These templates can include conditional logic as well as looping. There is a limit of 100 total widget templates per store.
Placements
Placements are the records to track which widget appears on which page, and in what order.
Currently, placements can only exist on the following pages:
- pages/blog-post
- pages/blog
- pages/brand
- pages/brands
- pages/cart
- pages/category
- pages/home
- pages/page
- pages/product
- pages/search
There is a limit of 75 placements per template file and 10,000 total placements per store.
Regions
Regions are specific spots in a Stencil template file where Widgets can be placed. Regions are defined at the theme file level using the following syntax: {{{region name=”…”\}}}. There can be many widgets inside a given region, and these widgets can have an assigned sort order.
Widget Configuration
This is a JSON payload that contains data used when rendering the widget. Each widget has a configuration, and there is a 64kb limit on the size of the JSON. The widget configuration must be valid JSON, but we don’t enforce any additional requirement on the structure of the configuration.