Skip to content

Instantly share code, notes, and snippets.

@netoisc
Created December 16, 2015 22:56
Show Gist options
  • Select an option

  • Save netoisc/b09de3ae62f543459549 to your computer and use it in GitHub Desktop.

Select an option

Save netoisc/b09de3ae62f543459549 to your computer and use it in GitHub Desktop.
Accessing the parent loop inside a bucle
<table>
{% for row in table %}
<tr>
{% set rowloop = loop %}
{% for cell in row %}
<td id="cell-{{ rowloop.index }}-{{ loop.index }}">{{ cell }}</td>
{% endfor %}
</tr>
{% endfor %}
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment