Skip to content

Instantly share code, notes, and snippets.

@JamieS
Created August 25, 2010 11:51
Show Gist options
  • Save JamieS/549343 to your computer and use it in GitHub Desktop.
Save JamieS/549343 to your computer and use it in GitHub Desktop.
Shopify Blog Display a collection in a blog
<div class="article">
<h2 class="article-title">{{ article.title }}</h2>
<p class="article-details">posted <span class="article-time">{{ article.published_at | date: "%Y %h" }}</span> by <span class="article-author">{{ article.author }}</span></p>
<div class="article-body textile">
{{ article.content }}
{% if article.title == 'Our New merchandise' %}
<ul>
{% for product in collections.new-merchandise.products limit:3 %}
<li>
<div class="feature-product">
<div class="gallery-image">
<a href="{{ product.url | within: collection }}" title="{{ product.title | escape }}>
<img src="{{ product.featured_image | product_img_url: 'small' }}" alt="{{ product.title | escape }}" />
</a>
</div>
<h2>
<a href="{{ product.url | within: collection }}">{{ product.title }}</a>
</h2>
<p>{{ product.price | money }}</p>
</div>
</li>
{% endfor %}
</ul>
{% endif %}
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment