How to render content blocks using Liquid
On this page
Where ever possible, render content block by using relationships in Salesforce. placing the content block on a page via the page record’s related list is one way of doing this. for a header or footer, you may specify the content block to use from on the store record. these relationships will allow you manage content using the StoreConnect website builder.
For uses where relationships are not supported, like placing a content block in an Article or rendering a content block from a theme template, use the following Liquid tag in any markdown compatible field or within a theme template.
liquid
{{ all_content_blocks['identifier'].render }}
Rendering content block attributes
If you need to access specific attributes of a content block (such as the title, image, or description), assign the rendered block to a variable first:
```liquid {% assign content_block = all_content_blocks[‘identifier’].render %}
{{ content_block.title }} ```