forblock
Information about the parent blocks loop.
Only exists within a blocks loop.
Properties
Returns the id of the block in the current iteration.
The 0-based index of the current iteration.
The 1-based index of the current iteration.
In local iteration, the type of the current block.
The total number of iterations in the loop.
In local iteration, the settings of the current block.
Example
Processing for special blocks
Add an outer div for the title block.
{{#blocks}}
{{#if forblock.type == "title"}}
<div class="title-wrapper">
{{#block wrapped=true /}}
</div>
{{#else /}}
{{#block /}}
{{/if}}
{{/blocks}}
Was this article helpful to you?