If I use any loop in Drupal, I can get loop.index to get the index of looped item. - Ref#1
For example -
{% for tag in content.some_array %}
<div class="item-count-{{loop.index}}">{{ tag.content }}</div>
{% endfor %}
This is a field containing paragraph type -
field--field-container.html.twig
and its content is {{items}}
({{items|length}}
gives the desired count)
The above template iterate through it's items and include the following template multiple times-
paragraph--multiple-blocks.html.twig
and its html is
<div class="multiple-blocks multiple-block-count-{{loop.index}}">
=====CONTENT=====
</div>
But I cannot get the loop.index (Ref#1) in the paragraph--multiple-blocks.html.twig
template. I tried (surely google search shows all links visited) kint()
debugging but could not get anything related to the count or index of the item iterated.
I will be grateful to any guide/help (don't want to code in PHP) close to get this done in twig files will.