1👍
You can use randomly generated classes or use Django’s cycle tag.
Using randomly generated classes:
{% for item in menu%}
<li>
<a href="{{ item.url }}">
<i class="ti-home-{{forloop.counter}}"></i>
<span>{{ item.title }}</span>
</a>
</li>
...
Using cycle tag:
{% for item in menu%}
<li>
<a href="{{ item.url }}">
<i class="{% cycle "ti-home-1" "ti-home-2" "ti-home-3" "ti-home-end"%}"></i>
<span>{{ item.title }}</span>
</a>
</li>
...
👤Yax
Source:stackexchange.com