ContentBlock - Liquid Object Reference
On this page
Description
The ContentBlock object contains configuration information for an area of content created in the CMS.
:::note
This object supports custom data via the data attribute.
:::
Backed by
This drop renders the s_c__Content_Block__c Salesforce object. A theme writes it as content_block.
| Liquid attribute | Salesforce field |
|---|---|
alignment |
s_c__Alignment__c |
identifier |
s_c__Identifier__c |
layout_style |
s_c__Layout_Style__c |
link_label |
s_c__Link_Label__c |
sub_type |
s_c__Sub_Type__c |
subtitle |
s_c__Subtitle__c |
template |
s_c__Template__c |
title |
s_c__Title__c |
Every other attribute on this drop is derived by StoreConnect rather than read straight from one field. The Attributes section lists them all.
Fields you add yourself are not listed above. Expose one with a Custom Data Mapping record, then read it from content_block.data. See custom data fields in Liquid.
Attributes
| Attribute | Type | Description |
|---|---|---|
alignment |
String | Returns the value of the Alignment attribute |
articles |
List[Article] | Returns a list of Articles linked to this Content Block |
children |
List[ContentBlock] | Returns a list of child Content Blocks linked to this Content Block |
content |
String | Returns the value of the Content attribute as rich text |
document |
Document | Returns the Document linked to this Content Block |
file |
File | Returns the File linked to this Content Block |
id |
String | Returns the unique id for this Content Block |
identifier |
String | Returns the value of the Identifier attribute |
image |
Image | Returns the Image linked to this Content Block |
layout_style |
String | Returns the value of the Layout Style attribute |
link_label |
String | Returns the value of the Link Label attribute |
link_target |
String | Returns the value of the Link Target attribute |
medium |
Medium | Returns the Medium linked to this Content Block |
pages |
List[Page] | Returns a list of Pages linked to this Content Block |
product_categories |
List[ProductCategory] | Returns a list of ProductCategories linked to this Content Block |
products |
List[Product] | Returns a list of Products linked to this Content Block |
pull_text |
String | Returns the value of the Pull Text attribute |
render |
String | Returns the rendered HTML content for this Content Block |
sub_type |
String | Returns the value of the Sub Type attribute |
subtitle |
String | Returns the value of the Subtitle attribute |
summary_content |
String | Returns the value of the Summary attribute as rich text |
template |
String | Returns the value of the Template attribute |
title |
String | Returns the value of the Title attribute |
video |
Video | Returns the Video linked to this Content Block |
Available on
- Article - Liquid Object Reference —
content_blocks - Global - Liquid Object Reference —
all_content_blocks - Page - Liquid Object Reference —
content_blocks - Product - Liquid Object Reference —
content_blocks - Store - Liquid Object Reference —
body_content,footer,head_content,header
Was this article helpful?
Thanks for your feedback! It helps us improve our docs.