Quantcast
Channel: Opinion: Shopify Community - Shopify Apps
Viewing all articles
Browse latest Browse all 11091

Jamie commented on Apps For Our Blogs

$
0
0

/Puts on super amazing funness hat

Hey Derek! Looks like you just need to harness all of your blog tags and make them into a clickable list of links with counts for each one.

Something like this you may be able to edit and drop into a sidebar:

<ul class="blog_list">
      {% for tag in blog.all_tags %}
        {% assign count = 0 %}
        {% for article in blogs[blog.handle].articles %}
          {% if article.tags contains tag %}
            {% capture count %}{{ count | plus: 1 }}{% endcapture %}
          {% endif %}
        {% endfor %}    <li><a href="{{ shop.url}}/blogs/{{ blog.handle }}/tagged/{{ tag | handleize }}" title="{{ blog.title }} tagged {{ tag | escape }}">{{ tag }} <span class="label count">({{ count }})</span></a></li>
      {% endfor %}</ul>

 


Viewing all articles
Browse latest Browse all 11091

Trending Articles