Search
Data Tags

Overview

After you have defined what article or articles you want to show, you can tell Articles Anywhere what article data you want to output to the page.

If you place nothing between the opening and ending tags, the full article will be placed:

{article title="Shetland Sheepdog"}{/article}

However, you will probably only want certain types of data to show, like only the text or only the title.
To define what data you want to get displayed, you place "Data Tags" within the {article} and {/article} tags.

For instance, to show only the title of the article with id 123, you can do:

{article id="123"}[title]{/article}

You can display a huge range of data types, including any article data, category data, dates, and even custom field values and dynamic data - pretty much anything you can think of.

Let’s take an in-depth look at the Data Tags available and their respective options and features. 

Refer to the respective sections of the documentation for the full explanation and details on how to use each of these.

Tip: Data types that return True / False values are especially useful to do custom checks with If Structures.

Article Data

SyntaxExampleDescription
[article] Show Example

My Article

Lectus pulvinar ullamcorper habitasse, orci augue morbi, elit elit at adipiscing. Maecenas erat cubilia id auctor potenti consectetur lobortis vivamus arcu tempor primis. Commodo primis morbi ornare in fringilla eros arcu auctor venenatis eleifend semper. Suscipit lacinia ante blandit non suspendisse et massa semper lorem sem. Augue condimentum faucibus odio tincidunt imperdiet justo rhoncus dolor lacus!

apples

Fringilla in posuere maecenas congue egestas habitant vivamus et non ad ultricies litora netus taciti magna in leo iaculis nostra. Nunc donec conubia nostra vulputate primis fringilla lobortis tincidunt curae scelerisque id curabitur. Molestie dapibus a semper quis amet dui suspendisse quis etiam quam mauris habitant vel ac magna imperdiet mollis praesent purus.

  • class condimentum tincidunt nibh tristique nibh consectetur porttitor est tristique
  • taciti aenean mauris ipsum commodo
  • consectetur sed ac cras
  • tristique lacus cubilia sit semper dictum sapien lacus

The entire article as displayed in the article view. See the Full Article section for a full explanation.
[title] Apples The title of the article.
[alias] apples The alias of the article.
[id] 12 The ID of the article.
[text], [introtext,] or [fulltext] Show Example

Lectus pulvinar ullamcorper habitasse, orci augue morbi, elit elit at adipiscing. Maecenas erat cubilia id auctor potenti consectetur lobortis vivamus arcu tempor primis. Commodo primis morbi ornare in fringilla eros arcu auctor venenatis eleifend semper. Suscipit lacinia ante blandit non suspendisse et massa semper lorem sem. Augue condimentum faucibus odio tincidunt imperdiet justo rhoncus dolor lacus!

apples

Fringilla in posuere maecenas congue egestas habitant vivamus et non ad ultricies litora netus taciti magna in leo iaculis nostra. Nunc donec conubia nostra vulputate primis fringilla lobortis tincidunt curae scelerisque id curabitur. Molestie dapibus a semper quis amet dui suspendisse quis etiam quam mauris habitant vel ac magna imperdiet mollis praesent purus.

  • class condimentum tincidunt nibh tristique nibh consectetur porttitor est tristique
  • taciti aenean mauris ipsum commodo
  • consectetur sed ac cras
  • tristique lacus cubilia sit semper dictum sapien lacus

The full text or the intro text of the article. See the Text section for a full explanation.
[category] Fruit The category that the article belongs to.
A lot more category data is available - see the Category Data below for more details.
[author], [author-id], [author-username] Peter Van Westen, 1, peter The name, ID and username of the author of the article.
[created-by-alias] Peter The alias set in the "Created by Alias" field of the article.
[modifier], [modifier-id], [modifier-username] Andy, 2, andy The name, ID and username of the article modifier (the "Modified by" user).
[image-intro] The intro image of the article.
A lot more image data is available - see the Images & Videos section below for more details.
[image-fulltext] The full article of the article.
A lot more image data is available - see the Images & Videos section below for more details.
[is_published] true A true/false value based on whether the article is published or not. This also takes into account the [publish_up] and [publish_down] dates.
[created], [publish_up], [publish_down], [modified] Wednesday, 5 February 2020 16:00 The create, publish and modify dates. The date format can be customized. See the Dates section for a full explanation.
[is_featured] false A true/false value based on whether the article is set as featured or not.
[has_access] true A true/false value based on whether the visitor/logged-in user has access to the article.
[ordering] 5 The ordering position of the article in the "Articles" manager.
[featured-ordering] 3 The ordering position of the article in the "Featured Articles" manager (If the article is set as featured).
[hits] 712 The number of views that the article received.
[url] /fruit/apples The URL to the article (you can also use [sefurl] in special cases).
[link]...[/link] Apples Opening and closing tag to add a link to the article (wraps the content with an [a href] tag).
[readmore] Read more: Apples A "read more" button that links to the full article. See the Read more section for a full explanation.
[edit] PRO Edit A link to the article editing page. See the Edit Link section for a full explanation.
[tags] PRO The tags attached to the article. See the Tags section for a full explanation.
[my-custom-field] PRO Green The value of any Custom Field attached to the article. Use the name of the desired field, for example: [color].
A lot more custom field data is available - see the Custom Fields section for a full explanation.
[language], [metadesc], [metakey], etc. ... Any other article data. It must match the name of the columns available in the database.
[meta-robots], [meta-author], [meta-rights], etc. ... Any attribute related to the Meta Data. It must match the attribute name in the metadata database column and must be prefixed with [meta-]
[urla], [urlb], [urlc], etc. ... Any attribute related to the links from the "Images and Links" tab. It must match the attribute name in the urls database column.
[show_title], [show_category], [show_author], etc. true Any attribute related to "Options" tab. It must match the attribute name in the attribs database column.
These can be particularly useful in If Structures.

Category Data

The following data types refer to the data of the category attached to the article:

SyntaxExampleDescription
[category] or [category-title] Fruit The title of the category.
[category-id] or [catid] 4 The ID of the category.
[category-alias] fruit The alias of the category.
[category-description] This category includes fruit. The description text of the category.
[category-image] PRO The image of the category. See the Images section for a full explanation and more details.
[category-url] PRO /fruit/ The URL to the category (you can also use [category-sefurl] in special cases).
[category-link]...[/category-link] PRO Fruit Opening and closing tag to add a link to the category (wraps the content with an [a href] tag).

The same exact data can also be output for the Parent Category of an article, by using parent-category instead of category.

Images & Videos

The following data types refer to the images and videos attached to the article:

SyntaxExampleDescription
[image-intro] The intro image of the article.
[image-intro-url] /images/fruit/apples_s.jpg The URL of the intro image.
[image-intro-alt], [image-intro-caption] Apples Any attribute related to the intro image.
[image-fulltext] The full article image of the article.
[image-fulltext-url] /images/fruit/apples_full.jpg The URL of the full article image.
[image-fulltext-alt], [image-fulltext-caption] Apples Article Any attribute related to the full article image.
[image-...] PRO   The image by given number found inside the article text. For example [image-2] to get the 2nd image found.
[image-1-width], [image-2-height], [image-3-alt], etc. PRO 200, 150, My Image Any attribute related to the image found inside the article text by the given number.
[image-random] PRO   To output a random image from the content of the article.
[category-image] PRO The image of the category attached to the article.
[my-image-field] PRO   The image from a Custom Field of type [media].
[youtube-...] PRO   The YouTube iframe tag by given number found inside the article text. For example [youtube-1] to get the 1st video found.
[youtube-random] PRO   To output a YouTube video from the content of the article.
[youtube-...-thumb] PRO   The thumbnail for the YouTube video by given number found inside the article text. For example [youtube-2-thumb] to get the thumbnail of the 2nd video found.
[vimeo-...] PRO   The Vimeo iframe tag by given number found inside the article text. For example [vimeo-1] to get the 1st video found.
[vimeo-random] PRO   To output a random Vimeo video from the content of the article.

See the Images section for a full explanation and more details on the images features. The Pro version of Articles Anywhere also has the ability to automatically create resized images (thumbnails) and much more.

Also see the Videos section for a full explanation and more details on how to output the videos contained in the article.

Custom Fields PRO

SyntaxExampleDescription
[habitat-area] Asia

The rendering of a custom field via its field layout, without the label.
Note: When used in Filters, Ordering and If Structures, this will use the rawvalue.

[habitat-area layout="false"] Asia Only the value of a custom field, without any html markup around it.
[habitat-area output="value"] as The rawvalue of a custom field, without any html markup around it.
[habitat-area label="only"] Habitat The label of a custom field.

See the Custom Fields section for a full explanation and more details.

Numbers PRO

In the following examples, let's say we're using Articles Anywhere with pagination, to show articles from the "Animals" category, which has a total of 75 articles. But we're only showing 10 articles per page, with a overall limit of 40:

{articles category="Animals" limit="40" per_page="10"}...{/articles}

Let's say we're looking at the 3rd article returned on the 2nd page (so the 13th article overall). This is what the Numbers output would result into:

Current Page Numbers

The following numbers data tags return the corresponding values for the articles displayed on the current page:

SyntaxExampleDescription
[total] 10 The total number of articles returned on the page. This also equals to the [count] of the last article.
[count] 3 The number of the current article in the list of articles on the page.
[previous] 2 The number of the previous article on the page. This will return the number of the last article when the current is the first.
[next] 4 The number of the next article on the page. This will return the number of the first article (1) when the current is the last.
[limit] 40 The maximum number of articles set to be returned.
[offset] 0 The offset when showing a range of articles not starting from the start.
[per_page] 10 When using pagination, the number of articles per page set to be returned.
[pages] 4 When using pagination, the number of pages generated by the results.
[page] 2 When using pagination, the number of the current page.
[previous_page] 1 The number of the previous page. This will return the number of the last page when the current is the first.
[next_page] 3 The number of the next page. This will return the number of the first page (1) when the current is the last.
[is_first] / [is_last] false / false A [true] / [false] value based on whether the current article is the first/last in the list of articles on the page.
[is_even] / [is_uneven] false / true A [true] / [false] value based on whether the current article is an even/uneven article in the list of articles on the page.
[has_next] / [has_previous] true / true A [true] / [false] value based on whether there is a next/previous article on the page (so can be false for first/last articles).
[every_...] . true A [true] / [false] value based on the number of the article in the list of articles. For example [every_3].
[is_..._of_...] false A [true] / [false] value based on the number of the article in the list of articles. For example [is_2_of_5].
[is_first_page] / [is_last_page] false / false When using pagination, a [true] / [false] value based on whether the current page is the first/last.
[has_next_page] / [has_previous_page] true / true When using pagination, a [true] / [false] value based on whether there is a next/previous page (so can be false for first/last pages).

No-Pagination Numbers

The following numbers data tags return the corresponding values before pagination is applied. These will be different from the ones above only if pagination is used:

SyntaxExampleDescription
[total_no_pagination] 40 The total number of articles before pagination is applied. This also equals to the [count_no_pagination] of the last article.
[count_no_pagination] 13 The number of the current article in the list of articles, regardless of pagination.
[previous_no_pagination] 12 The number of the previous article regardless of pagination. This will return the number of the last article when the current is the first.
[next_no_pagination] 14 The number of the next article regardless of pagination. This will return the number of the first article (1) when the current is the last.
[is_first_no_pagination] / [is_last_no_pagination] false / false A [true] / [false] value based on whether the current article is the first/last in the list of articles.
[is_even_no_pagination] / [is_uneven_no_pagination] false / true A [true] / [false] value based on whether the current article is an even/uneven article in the list of articles.
[has_next_no_pagination] / [has_previous_no_pagination] true / true A [true] / [false] value based on whether there is a next/previous article (so can be false for first/last articles).

No-Limit Numbers

The following numbers data tags return the corresponding values before [limit] and [offset] are applied:

SyntaxExampleDescription
[total_no_limit] 75 The total number of articles before limit is applied. This also equals to the [count_no_limit] of the last article.
[count_no_limit] 13 The number of the current article in the list of articles, not considering limit or offset.
[previous_no_limit] 12 The number of the previous article. This will return the number of the last article when the current is the first.
[next_no_limit] 14 The number of the next article. This will return the number of the first article (1) when the current is the last.
[is_first_no_limit] / [is_last_no_limit] false / false A [true] / [false] value based on whether the current article is the first/last in the total list of articles.
[is_even_no_limit] / [is_uneven_no_limit] false / true A [true] / [false] value based on whether the current article is an even/uneven article in the total list of articles.
[has_next_no_limit] / [has_previous_no_limit] true / true A [true] / [false] value based on whether there is a next/previous article (so can be false for first/last articles).

See the Numbers section for a full explanation and more details.

Dynamic Data PRO

You can output at any point, dynamic values and data from a specific article, by using one of the prefixes listed below.

You can follow the article prefixes with any of the Data Types, including article data, category data, user data, and custom field values. See the Data from Specific Article section for a full explanation and more details.

SyntaxDescription
[this:...] Any data type from the article that is currently displayed, so the article that contains the plugin tag itself.
[next:...] Any data type from the next article in the list of articles returned by the plugin tag.
[previous:...] Any data type from the previous article in the list of articles returned by the plugin tag.
[1:...], [2:...], [3:...], [4:...], etc. Any data type from a specific article in the list of articles returned by the plugin tag. The data name must be prepended with the respective [count] number of the article.
[user:id] The ID of the currently logged-in user (visitor of the page). This will be [0] if the visitor is not logged in.
[user:name], [user:username], [user:email] The name, username and email of the currently logged-in user (visitor of the page).
[user:guest] A true/false value based on whether the current visitor is a guest (true) or is logged-in (false).
[input:...] Any input data from a URL parameter (query string) or form input. See the Input Values section for a full explanation and more details.