Getting an zero index and count for an entry list I currently have an entries field which outputs a list of related entries on page. I'm trying to find a way to display two values for these entries.
The first would be a zero index. I'm trying to assign each entry to link up with a slider. Long story short, each of the 4 assigned entries would be listed as such
0 Entry One
1 Entry Two
2 Entry Three
3 Entry Four
The second would be to display a simple count of sorts before each entry. This would be displayed as

Entry One
Entry Two
Entry Three
Entry Four

I'm sure this must be possible but I'm unsure about the zero based index format. If anyone could help, I'd really appreciate it.
My code is currently set up as such
{% for project in sliderWork %}
   &lt;div class=&quot;progress__wrap&quot;&gt;
   &lt;span data-slick-index=&quot;This is where the zero based index would be displayed&quot; class=&quot;progressBar&quot;&gt;&lt;/span&gt;
     &lt;p&gt;&lt;i class=&quot;number&quot;&gt;This is where the simple numbering would be displayed&lt;/i&gt;{{project.title}&lt;/p&gt;
   &lt;/div&gt;
 {% endfor %}
There's an easier way... Twig has a built-in variable in for-loops called loop, which has loop.index and loop.index0 properties which output exactly what you're looking for:
https://twig.symfony.com/doc/3.x/tags/for.html#the-loop-variable
{% for project in sliderWork %}
   &lt;div class=&quot;progress__wrap&quot;&gt;
   &lt;span data-slick-index=&quot;{{ loop.index0 }}&quot; class=&quot;progressBar&quot;&gt;&lt;/span&gt;
     &lt;p&gt;&lt;i class=&quot;number&quot;&gt;{{ loop.index }}&lt;/i&gt;{{project.title}&lt;/p&gt;
   &lt;/div&gt;
 {% endfor %}