Liquid Template Variables - article

From Spiffy Stores Knowledge Base

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 %b" }}

article.updated_at

Returns the date and time that the article was last updated.

Revised on: {{ article.updated_at | date: "%Y %b" }}

article.published_at

Returns the date and time that the article was published. Setting the article's visibility to hidden clears the published_at timestamp, and setting the article's visibility to published sets it to the current time.

If the published_at timestamp has not been set, then the created_at timestamp will be used.

Published on: {{ article.published_at | date: "%Y %b" }}

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.

article.image

The image associated with an article is automatically extracted from the article text. It's usual to embed images in an article as this gives you full control on the appearance of the article. When you embed an image within the article text, the URL of the first such image will be returned.

article.images_count

Return the number of images associated with this article. If an image is found within the text of the article, a value of 1 will be returned. Otherwise, 0 is returned.