I have a Search Result Listing
Variant created using Scriban. This will render a card from each of the items got from the scope query
. However, I want to get the index of items at the scriban template.
Here is my current Search Result Listing
<div class="search-result-card" data-item-index="{{i_item.index}}">
...
</div>
Lets say my Scope
is returning 5 items, Basically I want to get the index of the current item and put it on a data-attribute
. But i_item
context that is exposed at scriban is pointing to current item.
Is there no way to get that index?
Sorry if my explanation is a it confusing.
Thanks all