{% for link in links %}
  1. {% if link.href %} {{ link.text }} {% else %} {{ link.text }} {% endif %}
  2. {% endfor %}