block
Block's content and settings.
Blocks is reusable content module that make up a template. The block object will only be allowed in html files in the blocks folder.
Properties
The ID of the block.
This ID is generated dynamically by Shopline.
The settings of the block.
For information on access settings, see Access Settings. To discover which input settings are applicable to attributes in the type settings, see Input Settings.
The data attributes for the block for use in the theme editor.
The JavaScript API of the theme editor uses data attributes to identify blocks and listen to events. block.shopline_attributes does not return any value outside the theme editor.
The type of the block.
This type is a free-form string defined in the schema of the block. You can use type as an identifier. For instance, you can display different markers depending on the block type.
The 0-based index of the current block.
The 1-based index of the current block.
The number of sub-blocks under the current block.