Difference between revisions of "Liquid Template Variables - article"

From Spiffy Stores Knowledge Base

m
Line 1: Line 1:
The liquid template variable ''article'' has the following attributes:
+
The Liquid template variable '''article''' has the following attributes:
  
 
== <code>article.id</code> ==
 
== <code>article.id</code> ==

Revision as of 11:49, 6 November 2013

The Liquid template variable article has the following attributes:

article.id

Returns the unique internal number of the article.

This is normally only for internal usage.

article.title

Returns the title of this article.

article.author

Returns the name of the author of this article.

article.content

Returns the content of this article.

article.synopsis

Returns the content of this article, up to a '<!--more-->' tag, if it exists.

This is useful for providing a summary of blog articles, without including the full text of the article.

article.more_tag?

Returns true if the '<!--more-->' tag is present in the article.

article.created_at

Returns the creation date and time of the article.

{{ article.created_at | date: "%Y %h" }}

article.url

The is the relative URL address of the article.

article.blog

This is the blog that this article belongs to.

article.type

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