Is it possible in Scriban to use the value from the variable, and then increment it and then use that value inside the sc_placeholder
If it is not possible using the basic default Scriban, maybe someone knows some extension that I can use with this.
This is what I mean by this:
{{- index = 0 -}}
{{if i_item.has_children}}
{{for i_child in i_item.children}}
<div class="section anchor-header" id="{{i_child.Anchor.raw}}">
<div class="container">
<div class="row">
<div class="col">
<h2 class="anchor-header-title">
{{i_child.Name}}
</h2>
<button type="button" class="anchor-header-button anchor-link">
<svg class="icon icon-arrow" aria-hidden="true">
<use xlink:href="#icon-arrow"></use>
</svg>
TOP
</button>
</div>
</div>
</div>
</div>
{{index++}}
{{sc_placeholder 'section-{{index}}' }}
{{end}}
{{end}}
With this code I am getting an error: Error while parsing unary expression: Expecting <expression> instead of "CodeExit" in: <operator> <expression>