forblock
Information about the parent blocks loop.
This object is available only within the blocks tag.
Properties
The ID of the current block.
The index of the current iteration, starting from 0.
The index of the current iteration, starting from 1.
The type of the current block.
The total number of blocks in the loop.
The settings of the current block.
Example
Add an outer div wrapper when the block type is title.
{{#blocks}}
{{#if forblock.type == "title"}}
<div class="title-wrapper">
{{#block wrapped=true /}}
</div>
{{#else /}}
{{#block /}}
{{/if}}
{{/blocks}}
Was this article helpful to you?