Skip to content

Instantly share code, notes, and snippets.

@asecondwill
Created September 20, 2014 07:48
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asecondwill/13dd9d613c3457374c4e to your computer and use it in GitHub Desktop.
Save asecondwill/13dd9d613c3457374c4e to your computer and use it in GitHub Desktop.
products.twig
{% extends "base.twig" %}
{% block sectionheader %}
<div class="gray">
<div class="row">
<div class="columns medium-2"><h2>Store</h2></div>
<div class="columns medium-10">
<div class="product-cats">
{% for cat in cats %}
<a href="{{cat.link}}">{{cat.name}}</a>
{% if not loop.last %} // {% endif %}
{% endfor %}
</div>
</div>
</div>
</div>
{% endblock %}
{% block content %}
<br>
<ul class="small-block-grid-3">
{% for item in products %}
<li>
<div class="product">
<a href="{{item.post.permalink}}">
<img class="productimage" src="{{item.post.get_thumbnail.get_src|resize(300, 300)}}" />
</a>
<a href="{{item.post.permalink}}">
{{ item.post.title }}
</a>
<p class="price">{{item.product.get_price_html}}</p>
<a href="{{item.product.add_to_cart_url}}" class="button">
Add to Cart
</a>
</div>
</li>
{% endfor %}
</ul>
{% endblock %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment