Liquid Template Variables - blogs

From Spiffy Stores Knowledge Base

Revision as of 12:50, 6 November 2013 by Admin (talk | contribs)

The Liquid template variable blogs contains a collection of all of this store’s blogs.

By calling a blog’s handle on the blogs variable, you will either receive a blog object.

For example:

<ul>
{% for article in blogs.myblog.articles  %}
  <li>{{ article.title }}</li>
{% endfor %}
</ul>

This lists all article titles for the blog called myblog.

blogs.size

This returns the number of blogs that have been published.