5.2 KiB
layout, title, nav
| layout | title | nav | ||
|---|---|---|---|---|
| default | article |
|
article
The article object has the following attributes:
{% anchor_link "article.author", "article-author" %}
Returns the full name of the article's author.
{% anchor_link "article.comments", "article-comments" %}
Returns the published comments of an article. Returns an empty array if comments are disabled.
{% anchor_link "article.comments_count", "article-comments_count" %}
Returns the number of published comments for an article.
{% anchor_link "article.comments_enabled?", "article-comments_enabled?" %}
Returns true if comments are enabled. Returns false if comments are disabled.
{% anchor_link "article.comment_post_url", "article-comment_post_url" %}
Returns the relative URL where POST requests are sent to when creating new comments.
Input
Output
{% anchor_link "article.content", "article-content" %}
Returns the content of an article.
{% anchor_link "article.created_at", "article-created_at" %}
Returns the timestamp of when an article was created. Use the date filter to format the timestamp.
Input
Output
{% anchor_link "article.excerpt", "article-excerpt" %}
Returns the excerpt of an article.
{% anchor_link "article.excerpt_or_content", "article-excerpt_or_content" %}
Returns article.excerpt of an article if it exists. Returns article.content if an excerpt does not exist for the article.
{% anchor_link "article.id", "article.id" %}
Returns the id of an article.
{% anchor_link "article.moderated?", "article-moderated?" %}
Returns true if the blog that the article belongs to is set to moderate comments. Returns false if the blog is not moderated.
{% anchor_link "article.published_at", "article-published_at" %}
Returns the date/time when an article was published. Use the date filter to format the timestamp.
{% anchor_link "article.tags", "article-tags" %}
Returns all the tags for an article.
Input
Output
{% anchor_link "article.title", "article-title" %}
Returns the title of an article.
{% anchor_link "article.url", "article-url" %}
Returns the relative URL of the article.
Input
Output
{% anchor_link "article.user.account_owner", "article-user-account_owner" %}
Returns "true" if the author of the article is the account owner of the shop. Returns "false" if the author is not the account owner.
{% anchor_link "article.user.bio", "article-user-bio" %}
Returns the bio of the author of an article. This is entered through the Staff members options on the Account page.
{% anchor_link "article.user.email", "article-user-email" %}
Returns the email of the author of an article. This is entered through the Staff members options on the Account page.
{% anchor_link "article.user.first_name", "article-user-first_name" %}
Returns the first name of the author of an article. This is entered through the Staff members options on the Account page.
{% anchor_link "article.user.last_name", "article-user-last_name" %}
Returns the last name of the author of an article. This is entered through the Staff members options on the Account page.
{% anchor_link "article.user.homepage", "article-user-homepage" %}
Returns the homepage of the author of an article. This is entered through the Staff members options on the Account page.