Output loop position number Good Evening,
This is probably something really simple, but I need to output the position of the entries in a query within the loop
{% set relatedEntries = craft.entries().section('memories').limit(10).orderby('RAND()') %}
            
{% for asset in relatedEntries %}
    &lt;div id=&quot;locate&quot; class=&quot;locate&quot;&gt;  
        &lt;div class=&quot;portname&quot;&gt;&lt;a href=&quot;/memory/index.php/bio/{entry_id}&quot;&gt; **LOOP NUMBER HERE**  {{ asset.title }}&lt;/a&gt;&lt;/div&gt;
    &lt;/div&gt; 
{% endfor %}

I want it to add the number between 1 and 10 depending on its position
Any help would be appreciated
You can use Twig's loop variable (docs).
{% for asset in relatedEntries %}
&lt;div id=&quot;locate&quot; class=&quot;locate&quot;&gt;  
  &lt;div class=&quot;portname&quot;&gt;
    &lt;a href=&quot;/memory/index.php/bio/{entry_id}&quot;&gt;{{ loop.index }}  {{ asset.title }}&lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt; 
{% endfor %}