Blog

From Shopify Wiki

Jump to: navigation, search

The liquid variable blog has the following attributes:

Contents

blog.id

Returns the id of this blog.

blog.handle

This is the accessor for this blog. It is usually the blog's title in underscore with every blank space replaced by a hyphen. "My New Blog" would thus have the handle "my-new-blog".

blog.title

Returns the title of this blog shopify

blog.articles

Returns a collection of all of this blog's articles that match the current paginate options.

blog.articles_count

Returns the count of all of this blog's articles that match the current paginate options.

blog.all_articles

Returns a collection of all of this blog's articles (ignoring pagination).

blog.all_articles_count

Returns the count of all of this blog's articles (ignoring pagination).

blog.url

Returns the relative URL of the blog. See also shop.url.

blog.comments_enabled?

Returns true if comments are enabled for this blog, false otherwise.

blog.moderated?

Returns true if this blog is moderated, false otherwise.