Liquid Template Variables - blogs: Difference between revisions
From Spiffy Stores Knowledge Base
No edit summary |
mNo edit summary |
||
| Line 11: | Line 11: | ||
This lists all article titles for the blog called '''myblog'''. | This lists all article titles for the blog called '''myblog'''. | ||
== <code>blogs.size</code> == | |||
This returns the number of blogs that have been published. | |||
Revision as of 13:16, 29 March 2011
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.