Skip to content

Instantly share code, notes, and snippets.

@boourns
Created July 4, 2013 04:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boourns/5924818 to your computer and use it in GitHub Desktop.
Save boourns/5924818 to your computer and use it in GitHub Desktop.
example of iterating over shop vendors
Example of iterating over list of vendors:
<ul>
{% for product_vendor in shop.vendors %}
<li class="{{ product_vendor }}">{{ product_vendor | link_to_vendor }}</li>
{% endfor %}
</ul>
Example of converting list to JSON:
{{ shop.vendors | json }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment