Difference between revisions of "Liquid Template Variables - blog"

From Spiffy Stores Knowledge Base

m
Line 62: Line 62:
  
 
A valid URL will only be returned when called from an [[Article.liquid]] template which is displaying the current article.
 
A valid URL will only be returned when called from an [[Article.liquid]] template which is displaying the current article.
 +
 +
== Further Reference ==
 +
 +
* [[Liquid Basics]]
 +
* [[Liquid Tag Reference]]
 +
* [[Liquid Filter Reference]]
 +
* [[Liquid Variable Reference]]
 +
* [[Liquid Paginate Tag|Pagination ]]

Revision as of 13:15, 25 June 2018

The Liquid template variable blog has the following attributes:

blog.id

Returns the unique internal number of the blog.

This is normally only for internal usage.

blog.handle

This is the blog handle. The handle uniquely identifies the blog in the URL address.

The handle is usually the blog's title in lower case with all blanks replaced by a dash. "My New Blog" would have the handle "my-new-blog".

blog.title

Returns the title of this blog.

blog.articles

Returns a collection of all of this blog's articles.

blog.articles_count

Returns the number of articles in the blog.

blog.url

The is the relative URL address of the blog.

blog.rss_feed

The is the relative URL address of the RSS feed for the blog.

blog.type

Returns the type of the object, in this case, 'blog'.

blog.images_count

Return the number of images associated with this blog. As blogs do not support associated images at this stage, the value of 0 is always returned.

blog.metafields

Return the metafields for the blog.

Metafields can only be managed using the Spiffy Stores API.

blog.next_article

Return the URL of the next older article.

If an older article doesn't exist, then return false.

A valid URL will only be returned when called from an Article.liquid template which is displaying the current article.

blog.previous_article

Return the URL of the previous newer article.

If a newer article doesn't exist, then return false.

A valid URL will only be returned when called from an Article.liquid template which is displaying the current article.

Further Reference