Liquid Template Variables - blogs: Difference between revisions

From Spiffy Stores Knowledge Base
Jump to: navigation, search
Admin (talk | contribs)
New page: The liquid template variable ''blogs'' contains a collection of all of this shop’s blogs and articles. By calling a blog’s handle on the ''blogs'' variable, you will either receive ...
 
Admin (talk | contribs)
No edit summary
Line 1: Line 1:
The liquid template variable ''blogs'' contains a collection of all of this shop’s blogs and articles.
The liquid template variable ''blogs'' contains a collection of all of this store’s [[Liquid Template Variables - blog|blogs]].


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

Revision as of 11:33, 13 September 2008

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.