Iterate over hashes in liquid templates

When you iterate over a hash using a variable called hash, hash[0] contains the key and hash[1] contains the value on each iteration.

{% for link_hash in page.links %}
  {% for link in link_hash %}
    <a href="https://stackoverflow.com/questions/8206869/{{ link[1] }}">{{ link[0] }}</a>
  {% endfor %}
{% endfor %}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)