Articles Anywhere

Place articles anywhere in Joomla!

  • Last updated: 02-Jun-2018
  • Version: 7.6.1
  • Types: System plugin Editor button plugin
  • Joomla rating: 100%
Joomla rating: 100%

Do you like Articles Anywhere?

Rate it!

Tutorial for Articles Anywhere

There is a Free and a Pro version of Articles Anywhere.
The parts in this tutorial that only concern the Pro version will be marked with: Pro only

Introduction

Articles Anywhere is a Joomla! system plugin (and editor button plugin).

With Articles Anywhere you can place articles anywhere in your site, including within 3rd party components, modules and even inside other articles.

You can place complete articles, but also only place specific article data (like title, read more link, intro text). You have full control over how you want to display that data and how to style it.

This can change the way you use your articles completely. For instance:

  • Create custom modules displaying the article or articles you want.
  • Create pages that show a number of defined articles
  • Create your own blog type pages
  • Create lists of article links (and other data)
  • Use an article as a content snippet, which you can include in multiple other articles/pages

How to use it (syntax)

This is how it works:

You place a starting {article} tag and an ending {/article} tag in your content (other article, module, etc).
This is what I will refer to as the Plugin Tags.

Between these Plugin Tags tags you can place Data Tags to tell Articles Anywhere what data you want to output.

{article Fluffy Kittens}[title]
[text]{/article}

The PRO version also allows you to place multiple articles based on Filters, like category, tags, custom fields, etc.
You do this by using the {articles} Plugin Tag (so with a trailing s).

{articles category="Animals"}[link][title][/link]
[introtext]{/articles}

Articles Anywhere overs some more cool features, like If Structures.
This makes Articles Anywhere a truely powerful and flexible tool you can use to create all sorts of article based output.

In this tutorial I will explain these different parts and how to use them.
So I'll dig in to the different Plugin Tags and the Filters you can use.
All the different Data Tags will be explained.
You'll learn how you can use the If Structures.
And I'll show you some examples of what can be done.

Note: You can simply place the tags into the normal WYSIWYG view of your editor. You do not have to switch to the HTML/code view.

Plugin Tags

Single article

You start of by defining what article you want to place data from. You can do this by using the title, alias or id of the article:

{article Fox Terrier}...{/article}
{article fox-terrier}...{/article}
{article 123}...{/article}

You can also make the tag use the current active article. This can be useful when you want to place data from the current article inside the article itself (like the title or readmore link) or inside a module.

To do this, simply don't give the article tag a specific article:

{article}...{/article}

This also works:

{article current}...{/article}

See the full list of Data Tags to learn what kind of data you can show for the article.

Multiple articles Pro only

The PRO version also supports an {articles} tag to output the data of multiple articles.
Articles Anywhere will repeat the content / data inside the tags for every article that matches the given Filters.

There are different ways you can tell the {articles} tag what articles to output: via a comma separated list of articles, via categories, via tags, via field values and via custom field values.
We will discuss those in depth further on in the tutorial.

To tell the {articles} tag what items to output and what possible other settings to take into account, need to use the attribute="value" syntax (like we know from html).

{articles category="Cats" tags="Hairy"}...{/articles}

These attributes can be Filters. But they can also be special settings to override the default behavior.

See the full list of Data Tags to learn what kind of data you can show for the articles.

Separating the output

The output of the multiple {articles} tag will be whatever output is generated for every article depending on your data tags.
This includes any markup you place between the {articles} tags like new lines.

Lets say you want to list all titles of all the articles in the category 'Dogs'. And you do this:

{articles category="Dog"}[title]{/articles}

This will result in something like:

AffenpinscherAfghan HoundAiredale Terrier...Yorkshire Terrier

As you can see all titles are output as one long line without any spaces or enters between the different title.
So that is most probably not what you want.

To output every title on a new line, you can simply place the closing {/articles} tag on a new line:

{articles category="Dog"}[title]
{/articles}

This will result in:

Affenpinscher
Afghan Hound
Airedale Terrier
...
Yorkshire Terrier

But what if you want a comma separated list? You could do this:

{articles category="Dog"}[title], {/articles}

But that will result in:

Affenpinscher, Afghan Hound, Airedale Terrier, ..., Yorkshire Terrier,

Notice the extra comma at the end. That is because the comma is also repeated for the last article returned.

For this reason you can use the separator="..." attribute. This will place whatever you put in there between every article/

{articles category="Dog" separator=", "}[title]{/articles}

Will result in:

Affenpinscher, Afghan Hound, Airedale Terrier, ..., Yorkshire Terrier

And:

{articles category="Dog" separator=" - "}[title]{/articles}

Will result in:

Affenpinscher - Afghan Hound - Airedale Terrier - ... - Yorkshire Terrier

Filters Pro only

As explained above, you can use Filters to determine what articles should be returned by the {articles} Plugin Tag.

The filters will determine what list of articles is used for the output.
But what article data is actually shown is determined by the Data Tags you place inbetween the Plugin Tags.

You can combine filters to narrow down the resulting list of articles.
So for instance, you can only show data from the articles in a certain category that also have a specific tag.

{articles categories="Dogs" tags="Tiny"}...{/articles}

Negative filters

To apply a negative filter, add a ! before the value.

So this will show all articles in the category "Cats" that do not have the tag "Cuddly":

{articles categories="Cats" tags="!Cuddly"}...{/articles}

Smaller or larger than

You can apply comparison filters on numeric and date values, by prepending the value with <, <=, > or >=.

For instance, this will show all articles that have a publish up date greater than 2018.

{articles publish_up=">=2018-01-01"}...{/articles}

Multiple groups

In some cases you don't want filters to narrow the result down, but to extend it.
You can group different filters by separating the groups with AND.
For instance, you might want to show all articles from the 'Dogs' category AND all featured articles that have the tag 'Tiny'.

{articles categories="Dogs" AND featured="true" tags="Tiny"}...{/articles}

You can use different filters per group.
Any setting attributes that directly affect the filter (like include_child_categories) will only be applied to that group. But the order and limit attributes will be applied to the whole tag.

So this tag will return only 3 articles in alphabetical order from the 'Animals' category (including all sub-categories) AND the 'Fruit' category (NOT including any sub-categories) AND the 'Monsters' category (including all sub-categories).

{articles categories="Animals" include_child_categories="true" AND categories="Fruit" AND categories="Monsters" include_child_categories="true" limit="3" order="title"}...{/articles}

Articles

You can simply give a comma separated list of article titles, aliases or ids of the desired articles using the articles="..." attribute.

{articles articles="Main Coone,norwegian-forest-cat,123"}...{/articles}

Instead of the articles="..." attribute, you can also use one of these for the same result: article="...", id="...", ids="...", item="...", items="...".

In this tutorial I will use articles="...". But you can use whichever you want.

When using only a list of articles, and no other filters (which you will learn more about later on in this tutorial), then you can also omit the articles="..." attribute completely and place the list directly into the tag, like:

{articles Main Coone,norwegian-forest-cat,123}...{/articles}

If your article title contains a comma, either use the article alias or ID instead, or escape the comma.

For instance, if you want to show the articles 'American, British and Exotic Shorthair' and 'Munchkin':

{articles American\, British and Exotic Shorthair,Munchkin}...{/articles}

Or using the aliases:

{articles american-british-and-exotic-shorthair,munchkin}...{/articles}

Categories

You can display multiple articles by their category.

All you need to do is to place a categories="..." attribute in the tag.

You can use the titles, aliases or ids of the desired categories.

{articles categories="Some Category,another-cat,12"}...{/articles}

Instead of the categories="..." attribute, you can also use one of these for the same result: category="...", cat="...", cats="...".

In this tutorial I will use categories="...". But you can use whichever you want.

To also include the articles from all child categories (categories nested under the given category), you can add the include_child_categories="true" attribute.

To only include the articles from the first level of child categories (categories directly nested under the given category), you can add the include_child_categories="1" attribute.
And use include_child_categories="2" to include the articles from the first and second level of child categories.

Tags

You can display multiple articles by their tags.

All you need to do is place a tags="..." attribute in the tag.

{articles tags="Fluffy,Cuddly"}...{/articles}

Instead of the tags="..." attribute, you can also use tag="..." for the same result.

In this tutorial I will use tags="...". But you can use whichever you want.

Custom Fields

You can filter articles by the value of the custom fields. This currently only works with simple values and list values (like checkboxes and multi-selects).

You need to use the field name as the attribute key.

Let's say you have a custom field 'Number of legs' that has a fieldname nr_of_legs, and you want to filter down to articles that have this values set to 3.

{articles nr_of_legs="3"}...{/articles}

Featured

You can make Articles Anywhere output all featured articles by adding the featured attribute.

{articles featured="true"}...{/articles}

Or exclude all featured articles.

{articles featured="false"}...{/articles}

Author

Want to only show articles by a certain author? Just filter down based on the created_by value.

{articles created_by="42"}...{/articles}

To show articles written by the visitor, you can utilize the user:id value (which is more explained in the Data Tags section).

{articles created_by="user:id"}...{/articles}

Article Data

Like with the custom fields, you can also filter down to any other available attribute saved in the article. As long as it is directly saved in the articles database.

So you can use filters like show_intro="true" to show all articles that have the 'Show Intro' setting specifically set to 'Yes'.

You can use the 'Inspect Element' option of your browser to see what field name to use.

Filter Values

You can check attributes for specific values like you have seen in above examples.
For instance, to filter down to articles having a 'Angry' tag, you use tags="Angry".
To filter down to featured articles, you use featured="true"

However, you can also use dynamic values.

Current

If you want to get all articles that have the same value as the current article you place the {articles} plugin tag in, you can use current as the value.

For instance, to get the articles that are under the same category, you can simply use: category="current"
Or to get the articles written by the same author, use created_by="current"

To exclude the current article from the results, add article="!current" to the plugin tag.

Wildcards

You can use the * wildcard to match articles, categories, tags or other filters by only a part of the value.

This will return all articles that have a title/alias starting with 'grey':

{articles articles="grey*"}...{/articles}

This will return all articles that have a title/alias containing 'cat':

{articles articles="*cat*"}...{/articles}

This will return all articles in categories that have a title/alias ending in 'hound':

{articles categories="*hound"}...{/articles}

This will return all articles that have a tag containing 'bold':

{articles tags="*bold*"}...{/articles}

Filter Settings Pro only

Limit/Range

By default Articles Anywhere will show all articles matching the given Filters.

In the Articles Anywhere system plugin settings you can define a default limit.

You can also define the limit in the {articles} tag by adding a limit="..." attribute.

To place only the first 20 articles in category 'Penguins':

{articles categories="Penguins" limit="20"}...{/articles}

To place only the first 10 articles that have the tag 'Has a tail':

{articles tag="Has a tail" limit="10"}...{/articles}

To show a range of articles not starting from the start, so for instance, show articles 21 to 40, you can do:

{articles category="Cute but Dangerous" limit="21-40"}...{/articles}

Ordering

In the Articles Anywhere system plugin settings you can define the default ordering of the articles returned by the plugin tag.

You can overrule the ordering in the {articles} tag by adding an ordering="..." attribute.

You can choose from these orderings:

  • ordering Article Manager Order
  • hits Hits
  • title Title
  • id ID
  • alias Alias
  • created Created Date
  • modified Modified Date
  • publish_up Start Publishing Date
  • publish_down Finish Publishing Date
  • random Random

To place all articles in category 12 in descending alphabetical order:

{articles category="12" ordering="title DESC"}...{/articles}

To place all articles in categories 'Insects' and 'Spiders' in random order:

{articles categories="Insects,Spiders" ordering="random"}...{/articles}

Access restricted articles

By default Articles Anywhere will not show articles that are access restricted. This means, articles with an access level not matching the users access level.

But you may want to show the titles or some alternative text to visitors that don't have access to the article.

To achieve this, you must first make sure the restricted articles will be collected and output by Articles Anywhere.
You can either switch on the global Ignore Article Access Level setting in Articles Anywhere plugin settings, or overrule this setting via the {article} or {articles} tag:

{articles category="Lizards" ignore_access="true"}

Then you can use the has_access value in the If Structures to conditionally output alternative content.

This example will show a list of linked titles, but show an unlinked title with extra text for restricted articles:

{articles category="Bears" ignore_access="true"}
{if has_access}[link][title][/link]{else}[title] (Please log in to read){/if}
{/article}

Output when empty

Let's say you created a tag to output all articles from category 'Fish' that have the tag 'Has legs'. But the times there are no featured articles in that category, you want to place a little message saying 'Currently no fish found with legs!'.

You can place this text in the empty attribute.

{articles categories="Fish" tag="Has 3 legs" empty="Currently no fish found with legs!"}...{/articles}

Data Tags

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 layout will be placed:

{article 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, place data type tags within the {article} and {/article} tags.

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

{article 123}[title]{/article}

You can choose from these data types:

Article

  • [layout] the entire article. See the Layout section for a full explanation.
  • [text] the entire text: introtext+fulltext
  • [readmore] a read more link. See the Readmore section for a full explanation.
  • [link]...[/link] open and close tag to add a link to the article
  • [url] the url to the article (you can also use [sefurl] in special cases)
  • [introtext]
  • [fulltext] the text part below the read more bar
  • [id]
  • [title]
  • [author_id], [author_name], [author_username] the id, name and username of the articles author (created by)
  • [author_alias] or [created_by_alias] the alias set in the 'Created by Alias' field of the articles
  • [modifier_id], [modifier_name], [modifier_username] the id, name and username of the articles modifier (modified by)
  • [has_access] a true/false value based on whether the visitor has access to the article
  • [edit] a link to the article edit page. See the Edit section for a full explanation. Pro only
  • [field_name] any available field (must match the column name in the database)

Images

  • [image-intro] the intro image attached to the article
  • [image-intro-url] the url of the intro image attached to the article
  • [image-intro-...] You can also get the alt, caption and class of the intro image

  • [image-fulltext] the full article image attached to the article
  • [image-fulltext-url] the url of the full article image attached to the article
  • [image-intro-...] You can also get the alt, caption and class of the full artcle image

  • [image-...] the image by given number found inside the article text, ie [image-2] Pro only
  • [image-...-url] the url of the image by given number found inside the article text, ie [image-3-url] Pro only
  • [image-...-...] any attribute available in the image tag, ie [image-4-width] Pro only

  • [image-count] the number of images found inside the article text Pro only

  • [image-category] the image attached to the category Pro only
  • [image-category-url] the url of the image attached to the category Pro only

See the Images section for a full explanation.

Videos Pro only

  • [youtube-...] the youtube iframe tag by given number found inside the article text, ie [youtube-1]
  • [youtube-...-id] the youtube video ID by given number found inside the article text, ie [youtube-2-id]
  • [youtube-...-url] / [youtube-...-short-url] / [youtube-...-iframe-url] the urls of the youtube video by given number found inside the article text, ie [youtube-3-url]
  • [youtube-...-thumb] the thumbnail for the youtube video by given number found inside the article text, ie [youtube-4-thumb]
  • [youtube-...-thumb-url] the url of the thumbnail for the youtube video by given number found inside the article text, ie [youtube-5-thumb-url]
  • [youtube-...-...] any attribute available in the youtube iframe tag, ie [image-6-class]
  • [youtube-count] the number of youtube videos found inside the article text
  • [youtube-...-link]...[/youtube-...-link] open and close tag to add a link to the youtube video

  • [vimeo-...] the vimeo iframe tag by given number found inside the article text, ie [vimeo-1]
  • [vimeo-...-id] the vimeo video ID by given number found inside the article text, ie [vimeo-2-id]
  • [vimeo-...-url] / [vimeo-...-iframe-url] the urls of the vimeo video by given number found inside the article text, ie [vimeo-3-url]
  • [vimeo-...-...] any attribute available in the vimeo iframe tag, ie [image-4-class]
  • [vimeo-count] the number of vimeo videos found inside the article text
  • [vimeo-...-link]...[/vimeo-...-link] open and close tag to add a link to the vimeo video

See the Videos section for a full explanation.

Custom Fields

  • [custom_field_name] any custom field (title and) value attached to the article Pro only

See the Custom Fields section for a full explanation.

Category

  • [category_id] or [catid] the id of the parent category
  • [category_title]the title
  • [category_alias] the alias
  • [category_description] the description
  • [category_link]...[/category_link] open and close tag to add a link to the category Pro only
  • [category_url] the url to the category (you can also use [category_sefurl] in special cases) Pro only

  • [image-category] the image attached to the category Pro only
  • [image-category-url] the url of the image attached to the category Pro only

Tags

  • [tags] the tags attached to the article Pro only

See the Tags section for a full explanation.

User

The [user:...] Data Tags will return any available data of the visitor of the page.
If the visitor is not logged in, most of these Data Tags will return empty.

  • [user:id] the id of the user. This will be 0 if the visitor is not logged in.
  • [user:name]
  • [user:username]
  • [user:email]
  • [user:guest] a false or true value based on whether the visitor is logged in or not.

Numbers Pro only

  • [total] the total number of the article returned by the {articles} tag Pro only
  • [total_before_limit] the total number of articles before the limit is applied Pro only
  • [count] the number of the article when using the {articles} tag Pro only
  • [first] a true/false value based on whether the article is the first in the returned list of articles Pro only
  • [last] a true/false value based on whether the article is the last in the returned list of articles Pro only
  • [next] the number of the next item in the list. This will return the number of the first article (1) when the current is the last Pro only
  • [previous] the number of the previous item in the list. This will return the number of the last article when the current is the first Pro only
  • [has_next] / [has_previous] a true/false value based on whether there is a next/previous item (so can be false for first/last items) Pro only
  • [even] a true/false value based on whether the article is an even article in the returned list of articles Pro only
  • [uneven] a true/false value based on whether the article is an uneven article in the returned list of articles Pro only Pro only
  • [every_...] a true/false value based on the article number of the article in the returned list of articles Pro only Pro only
  • [is_...of...] a true/false value based on the article number of the article in the returned list of articles Pro only Pro only

See the Numbers section for a full explanation.

Styling

You can give the tags any styling you want simply by using the styling options in your editor.

For instance, you can make the title a Heading 3 by selecting the [title] tag and choosing Heading 3 in your editors styles.

So something like this can be done:

{article Some Article}
[title]

[introtext]

[readmore]{/article}

Texts

Limiting and stripping text

Limit by characters

With any text data tag - like [text], [introtext], [fulltext] and [title] - you can limit the tag to only show a certain amount of characters. HTML tags and images are not counted, only the text.

For example, to show the first 100 characters of the entire text, simply use:

[text limit="100"]
Limit by words

To limit the text to a number of words, you can do:

[text words="20"]
Limit by paragraphs

You can limit the text to a number of paragraphs.

This will break off the text after the second </p> tag it finds in the html code of the article's fulltext.

[fulltext paragraphs="2"]
Stripping html tags

If you want to strip the text from html tags for any reason, you can do:

[text strip="true"]
[text limit="100" strip="true"]
Stripping image tags

You might want to keep the html tags and styling of the content, but remove the images. You can do that with:

[text noimages="true"]

Page breaks

In Joomla you can split a text into multiple pages using page breaks.

You can output these different pages separately via the page attribute.
For instance, to only output the 3rd page of an article, you can do:

[text page="3"]

Or use the given title for that page, like:

[text page="My Third Page"]

Layout

The [layout] tag will render the entire article the way your template does in the default article page. Generally that includes the title, text and some meta data, like the author and creation date (dependant on your settings).

So if you want to output the complete article, you can do:

{article Modern Persian Cat}[layout]{/article}

But if you place nothing between the opening and ending tags, the layout will be used too. So this also works:

{article Modern Persian Cat}{/article}

If you want to use an alternative layout which your template provides, you can define that like this:

[layout my_cat_layout]

Or:

[layout layout="my_layout"]

You can also make it use the layout of a different template:

[layout template="my_template" layout="my_cat_layout"]

Read more link

When showing the read more link, you can also overrule the standard Read more... text.
For example, if you want the text Please read on! to link to the article:

[readmore text="Please read on!"]

The readmore link gets the default readmore classname. If you want to overrule that, you can do:

[readmore text="Please read on!" class="my-own-class"]

Or if you only want to overrule the class (and not the text):

[readmore class="my-own-class"]

Dates

You can add a date syntax to any data tags that have a date value, like:

{article 123}[created format="F jS Y"]{/article}

That would result in something like: June 24th 2018

The date is format via the PHP date function. You can see what date characters you can use PHP date function.

You can use date values inside If Structures, like:

{if created >= '2018-01-01'}...{/if}

You can also compare dates to the current date using the NOW keyword:

{if publish_up > NOW}Coming soon{/if}

Images

Intro / Full text images

You can output the full intro image or full text image with:

[image-intro]
[image-fulltext]

If you want to use the url instead of the entire image tag - to create your own custom image tags for instance - you need to add -url to the tags:

[image-intro-url]
[image-fulltext-url]

These are all the available tags regarding the intro image and full text image:

  • [image-intro] The intro image
  • [image-intro-url] The url of the intro image
  • [image-into-alt]
  • [image-intro-caption]
  • [image-fulltext-class]

  • [image-fulltext] The full text image
  • [image-fulltext-url] The url of the full text image
  • [image-fulltext-alt]
  • [image-fulltext-caption]
  • [image-fulltext-class]

Images from content Pro only

The Pro version also gives you the ability to place images that have been placed inside the content of the article's text.

To place the first image, simply use [image-1]. To place the fifth image found in the content, use [image-5].

To output the url of these images instead - for instance to create your own custom <img> tag - add -url to the tag.
So [image-1-url] for the url of the first image and [image-5-url] for the url of the fifth image.

You can grab any available attribute that is found inside the original html <img> tag too.
For instance, [image-3-width] will output whatever is found in the width="..." attribute.
If the attribute is not found in the <img> tag, it will simply return nothing.

Suffixes

Articles Anywhere doesn't generate thumbnails. However, you can add a suffix to the url to create the thumbnail url.

Let's say you have this <img> tag in your content:

<img src="/images/my_special_image.jpg" />

Then you can do [image-1 suffix="_t"] to output:

<img src="/images/my_special_image_t.jpg" />

You will still need to create these thumbnail images yourself though, and name them using the given suffix.

Thumbnails

As explained above, you can add a suffix to creat thumbnail urls.

You can use these shortcuts for the suffix="_t" stuff:

[image-...-thumb] is the same as [image-... suffix="_t"]
[image-...-thumb-url] is the same as [image-...-url suffix="_t"]

Image Count

You can use the [image-count] data tag to output the total number of images found in the text. You can also use this value in the If Structures.

Category Images Pro only

The Pro version also allows you to output the image attached to the category of the article.

Like with the intro / fulltext images, you can either output the full image (<img> tag) with [image-category].

Adding or overriding attributes

You can override attributes or set extra attributes to be used in the final <img> tag in any image data tag that generates one.

For instance, you can set the width and height specifically:

[image-intro width="200" height="150"]

Or override the classname:

[image-3 class="my-new-classname"]

Videos

Youtube

The Pro version gives you the ability to place youtube videos that have been placed inside the content of the article's text (via the youtube iframe code).

To place the first youtube video found, simply use [youtube-1]. To place the fifth image found in the content, use [youtube-5].

To output the url of these images instead - add -url to the tag. This will output the url as you see it in the browser.
To output the embed url for use in ifames add -iframe-url to the tag.
And to output the short url (using the youtu.be domain) add -short-url to the tag.

You can grab any available attribute that is found inside the original html <iframe> tag too.
For instance, [youtube-3-class] will output whatever is found in the class="..." attribute.
If the attribute is not found in the <img> tag, it will simply return nothing.

Thumbnails

You can output the youtube thumbnail image for the video using [youtube-...-thumb]. And like with other Image tags, you can outut the url with [youtube-...-thumb-url]

Count

You can use the [youtube-count] data tag to output the total number of youtube videos found in the text. You can also use this value in the If Structures.

Links

To add a link to the youtube video, use the [youtube-...-link]...[/youtube-...-link] tags.

This will output a linked thumbnail image of the first youtube video found in the article:

[youtube-1-link][youtube-1-thumb][/youtube-1-link]

Vimeo

The Pro version gives you the ability to place vimeo videos that have been placed inside the content of the article's text (via the vimeo iframe code).

To place the first vimeo video found, simply use [vimeo-1]. To place the fifth image found in the content, use [vimeo-5].

To output the url of these images instead - add -url to the tag. This will output the url as you see it in the browser.
To output the embed url for use in ifames add -iframe-url to the tag.
And to output the short url (using the youtu.be domain) add -short-url to the tag.

You can grab any available attribute that is found inside the original html <iframe> tag too.
For instance, [vimeo-3-class] will output whatever is found in the class="..." attribute.
If the attribute is not found in the <img> tag, it will simply return nothing.

Count

You can use the [vimeo-count] data tag to output the total number of vimeo videos found in the text. You can also use this value in the If Structures.

Links

To add a link to the vimeo video, use the [vimeo-...-link]...[/vimeo-...-link] tags.

This will output a link to the first youtube video found in the article:

[vimeo-1-link]Go to Vimeo[/vimeo-1-link]

Adding or overriding attributes

You can override attributes or set extra attributes to be used in the final <iframe> tag in any video data tag that generates one.

For instance, you can set your own classname:

[youtube-3 class="my-youtube-vid"]
[vimeo-2 class="my-vimeo-vid"]

Custom Fields Pro only

You can display any custom field of an article using the name of that specific field.

Let's say you want to show the value of the custom field 'Habitat' - that has a field name habitat_area - of article 'Lions'.

{article Lions}[habitat_area]{/article}

If you want to place the value of a custom field inside the content of that same article, simply place this inside the article:

{article}[habitat_area]{/article}

Field label

By default only the value of the field is shown. But you can also output the label.

This shows the only the label of the field:

[habitat_area label="only"]

And this shows both the label and the value of the field, like:
Habitat: Africa

[habitat_area label="true"]

Option values and names

For some custom field types you can have different option values, like for lists, checkboxes and radio buttons.
For every option you can enter a name and it's value.

By default the Data Tags will output the option names.

For instance, that 'Habitat' field is a custom list field that has the options Africa, Asia and Europe with respectivly the values af, as and eu.
And let's say the second option is selected.

Then [habitat_area] will output: Asia

But you might want to output the value as instead, for instance to use in a classname.

To do this, you can use the output="value" attribute. This will make it output the option values instead of the names.

[habitat_area] => Asia
[habitat_area output="value"] => as

Here is an example of how you could use both the text and value of the custom field.

<div class="my-habitat-class-[habitat_area output="value"]">[habitat_area]</div>

When saving this, your editor might mess up the code because of the nested quotes.
You can work around this issue by using the quote html entity &quot; inside the data tag instead:

<div class="my-habitat-class-[habitat_area output=&quot;value&quot;]">[habitat_area]</div>

Whith in this case would result in:

<div class="my-habitat-class-as">Asia</div>

Using layouts

By default the label / value will be output as plain text without any html markup around it.
If you want to have Articles Anywhere output the custom field through the layout (like the core Custom Field plugin does), you can do:

[habitat_area layout="true"]

The layout will output both the label and the value (by default). To only output the value, you can do:

[habitat_area layout="true" label="false"]

Custom layouts

By default - when using layout="true" - this layout file will be used to generate the output for the custom fields:

components/com_fields/layouts/field/render.php

However you can override the layout with your own custom file. This way you are in complete control of how the names and values are placed in your content.

Just pass the path to the layout file in the layout="..." attribute (instead of layout="true").

[habitat_area layout="templates/my_template/layouts/habitat_field.php"]

Or if you prefer the dotted syntax, this also works:

[habitat_area layout="templates.my_template.layouts.habitat_field"]

Custom value layouts

By default values will simply be output separated by the default (comma) or set separator.

But you can also use a layout file that controls how the value or values are output
This is especially useful for custom fields that can have multiple values, like checkbox lists and multi-select fields.
To set a specific layout for the field value, use the value_layout="..." attribute.

For instance, you create a layout file in your template folder called color_field_values.php.

You can use this layout file by passing the path to that file as the value of the value_layout attribute:

[habitat_area value_layout="templates/my_template/layouts/area_values.php"]

Tags Pro only

You can display the tags of an article with the [tags] tag.

This shows the tags of article 'Catfish':

{article Catfish}[tags]{/article}

By default, the output will be generated through the Joomla layout for tags. If you want it to output unstyled simple links, you can add the clean="true" attribute.

You can also set a specific separator to place between the tag links:

[tags clean="true" separator=" - "]

To output the tags as plain text - so not as links - use the strip="true" attribute.

Edit link Pro only

You can output an edit link to users that have the correct permissions.

To place the default edit link (with icon), simply use: [edit]

To output the edit url - for instance, to make your own custom link - you can use: [edit_url]

Numbers Pro only

When using the multiple {articles} tag, you will have a number of articles being output.

Articles Anywhere offers a number of values based on what place the article has in list of articles.

You can output the values via the Data Tag. But you can also use these values in the If Structures.
This way you can conditionally output html/content/data based on the dynamic values. Like the number of the article in the list. Or if it is an 'even' or 'uneven' article.
You could - for instance - use this to create a custom pagination.

Totals

The total value contains the total number of the articles returned by teh {articles} tag.

When you use the limit="..." attribute, to - for instance - only return 5 articles, then you might also want to know (and use) the total number of articles that would have been returned if there was no limit. You can get this value with the total_before_limit value.

Count

The count value contains the number of the article in that set of articles.
So for the first article count will give you 1. For the seventh article, it will give you 7.

You can -for example - use this count tag to create ids or classnames. In the HTML/code view of the editor, you could place:

<div class="my_article_[count]">[title]</div>

This example will show the linked title and introtext of the first 3 article and only the linked title of the rest:

{articles category="Mice"}[link][title][/link]
{if count<=3}[introtext]

{/if}{/articles}

First / Last

The first and last values mark the first and last article returned by the {articles} tag.

This example shows how to add a different classname for the first and last articles in the output (in html view):

<div class="my_article {if first}my_first_article{/if} {if last}my_last_article{/if}">

You can of course use this for other things as well, like conditionally showing extra data or html for the first and/or last article.

Next / Previous

The next value gives the number of the next item in the list. This will return the number of the first article (1) when the current is the last.

The previous value gives the number of the previous item in the list. This will return the number of the last article when the current is the first.

You can use these to create pagination type stuff, or anchor links to the next/previous articles.
This is an html example of a blog page with previous/next links:

<p>{articles category="My Category}</p>
<h2><a href="/article-[count]"></a>[title]</h2>
<p>[text]</p>
<p><a href="#article-[previous]">previous</a> <a href="#article-[next]">next</a></p>
<p>{/articles}</p>

The has_next and has_previous values will return a true/false value based on whether there is a next/previous item.
This means that has_previous will only be false for the first item and the has_next will only be false for the last value.

Even / Uneven

The even and uneven values are handy for creating lists that have an alternating class. Like a 'zebra-striped' table.

This example shows how to add a different classname for the even and uneven articles in the output (in html view):

<div class="my_article {if even}my_article_even{/if} {if uneven}my_article_uneven{/if}">

The same can be done with an else:

<div class="my_article {if even}my_article_even{else}my_article_uneven{/if}">

Or even shorter with the same result:

<div class="my_article my_article_{if uneven}un{/if}even">

You can of course use this for other things as well, like conditionally showing extra data or html for the even or uneven articles.

Every ...

The every_... values are useful to add extra html or a classname for every so-manieth article.

Let's say you want to create columns. Then you will need to add extra html or classnames to mark the beginning or end of each row.
For this purpose you you can use the every_... value.

This example shows how to add an extra closing and opening <div> after every 4rt article in the output (in html view):

{if every_4}</div><div>{/if}

Columns

An even more flexible value is the is_..._... value.

Just some examples:
The is_1_of_3 value will be true for the 1st, 4rth, 7th, etc article.
The is_3_of_3 value will be true for the 3rd, 6th, 9th, etc article.
And the is_2_of_5 value will be true for the 2nd, 7th, 12th, etc article.

This example shows how to add a different classname for every 2nd article when splitting the result in groups of 5:

<div class="my_article {if is_2_of_5}my_special_article{/if}">

 

See the If Structures section for more information on the {if} tags.

Div tags

To help align and group the articles, you can place special [div]...[/div] tags within the {article} tags, like:

{article 123}[div][title][/div]{/article}

You have basic styling abilities too. You can give the div a certain height, width, alignment (float) and a custom classname, like:

{article 123}[div width="200" height="300" float="left" class="my-class"][text][/div]{/article}

This can also be easily inserted via the editor button.

If Structures

Articles Anywhere allows you to use (simple) if-else structures inside the tags.

The if structure tag syntax looks like:

{if ...}...{elseif ...}...{else}...{/if}

This way you can check whether a data types is not empty or false, like:

{if fulltext}...{/if}

Or place specific content if the a data type IS empty or false:

{if !fulltext}...{if} 

Or check if a data type is (or is not) a certain value, like:

{if created_by = 62}...{/if}
{if title != 'Furry Animals'}...{/if}

For instance, if you only want the readmore tag placed if the article has a fulltext, you can do:

{if fulltext}[readmore]{/if}

Or if you want a different readmore text if the article has a fulltext, you can do:

{if fulltext}[readmore text="Read full story"]{else}[readmore text="See intro"]{/if}

You can place multiple conditions in to one {if} tag.
If all of the conditions should pass, separate the conditions with AND or &&.
If any of the conditions should pass, separate the conditions with OR or ||.

{if category == 'Cats' && 'furry' IN tags}It's furry and purry{/if}

Articles Anywhere supports these comparison operators:

  • = Equal
  • != Not equal
  • < Less than
  • > Greater than
  • <= Less than or equal to
  • >= Greater than or equal to
  • IN Value is found in list of values. Example: {if 'Cats' IN tags}
  • NOT IN Value is found in list of values

You can use pretty much any Data Tag as values inside the if conditions.

Especially the Numbers are very useful.

For full control via php, you could use Sourcerer to output the {article} tag depending on your custom checks.

K2 support Pro only

The PRO version of Articles Anywhere also has LIMITED support for K2 items. To get the K2 item, just add a type="k2" attribute to the tag, like:

{article type="k2" article="Some K2 item"}...{/article}
{article type="k2" article="some-k2-item"}...{/article}
{article type="k2" article="123"}...{/article}

You can also use the filters to get multiple K2 items.

To place all K2 items in K2 category 12 in descending alphabetical order:

{articles type="k2" category="12" ordering="title DESC"}...{/articles}

Images

K2 does not have an intro or fulltext image. Instead you can use these tags to get the data of the main image attached to the K2 item: [image], [image-url], [thumb], [thumb-url].

You can also get the in-content images as explained in the main Images section.

Extra fields

K2 has the ability to set extra fields. To display these, you can simply use the data tags: [extra-1][extra-2], etc...

Editor Button

You can enter the tags directly into your content. However, to save time typing and remembering what the exact syntax is, Articles Anywhere comes with a handy editor button.

You can use this editor button (located below the text input area) to place an {article} tag with the desired (basic) data type tags into your article (or other editor fields).

You can customise the default tag settings in the Articles Anywhere system plugin settings.

Examples

You can find a lot more cool examples on the Demo Page.

Example: title, intro, read more link

{article 123}[title]
[introtext]
[readmore text=">> READ MORE >>"]{/article}

Example: linked title, first 100 characters of intro and a simple link to the article

{article 123}[link][title][/link] - [introtext limit="100"] - [link]read more...[/link]{/article}

Example in HTML: title with link to article, first 120 characters of (entire) text.

(For use in HTML view of your editor)

{article 123}<h2><a href="/[url]">[title]</a></h2>[textlimit="120"]{/article}

Example: list of linked titles of series of articles Pro only

{articles 101,102,103,104,105}- [link][title][/link]
{/articles}

Settings

Articles Anywhere is packed with options, giving you control over how it works and behaves. Here is the full list of the options you can find in the Articles Anywhere system plugin settings:

Behaviour

Default Maximum Articles Define the default maximum articles to return when using categories in the articles tag. Set to 0 or leave empty for no limit.
Article Field to Order By Define the default article ordering field when using categories in the articles tag.

Options: Article Order, Hits, Title, ID, Alias, Created Date, Modified Date, Start Publishing Date, Finish Publishing Date, Random
Ordering Direction Select the direction you would like Articles to be ordered by.
Ignore Language Assignment
for Articles, Categories Pro only and Tags Pro only
If selected, the language assignment will be ignored.

Can be overruled via the tag like: {article article="My Article" ignore_language="true"}
Ignore Access Level
for Articles, Categories Pro only and Tags Pro only
If selected, the access level selection will be ignored.

Can be overruled via the tag like: {article article="My Article" ignore_access="true"}
Ignore Publish State
for Articles, Categories Pro only and Tags Pro only
If selected, the publishing state (and dates) will be ignored.

Can be overruled via the tag like: {article article="My Article" ignore_state="true"}
Use Ellipsis If enabled, an ellipsis ... will be added to the end of texts that are limited to a number of characters/words.
Increase Hits Select to have the articles hits counter increase when using the [text] or [fulltext] data tags.
Fix HTML Select to let the extension fix any html structure issues it finds. This is often necessary to deal with surrounding html tags.

Only switch this off if you have issues with this.

Can be overruled via the tag like: {article article="My Article" fixhtml="true"}
Place HTML comments By default HTML comments are placed around the output of this extension.

These comments can help you troubleshooting when you don't get the output you expect.

If you prefer to not have these comments in your HTML output, turn this option off.

Security Options Pro only

Articles

These settings have effect on Articles and Categories.

Enable in articles Select whether to enable the use of the syntax in articles.
Security Level Set the level of security. Articles Anywhere tags will be stripped from articles with an owner (creator) below this group level.

Components

These settings have effect on the component area.
You can select in which components Articles Anywhere should not be enabled. Advise is to not allow Articles Anywhere in components that non-backend users can post content in.

Enable in components Select whether to enable the use of the syntax in components.
Disable on Components Select in which components NOT to enable the use of the syntax in. This is a list of your installed frontend components.
Remove in Disabled Components If selected, the plugin syntax will get removed from the component. If not, the original plugins syntax will remain in tact.

Other Areas

These settings have effect on areas outside the component area (so in Modules and the rest of the website).

Enable other areas Select whether to enable the use of the syntax in all remaining areas, like the modules. The tag will not be handled/shown in the html head (META tags and such).

Editor Button Options

Button Text This text will be shown in the Editor Button.
Enable in frontend If enabled, it will also be available in the frontend.

Default Data Tag settings

Set the default values of the Data Tag selections for the Articles Anywhere popup

Layout
Enable Layout Tag Select to insert the [layout] tag by default
Enable Custom Layout Optionally set a custom layout to use instead of the default article layout.
Title
Enable Title Tag Select to insert the [title] tag by default
Title Heading Select the type of heading you want for the title.

Options: None, Heading 1, Heading 2, Heading 3, Heading 4, Heading 5, Heading 6
Intro Image
Enable Intro Image Tag Select to insert the [image-intro] tag by default
Content
Enable Text Tag Select to insert one of the Text tags by default
Text Type Select which text type to use.
All text = Intro + Full text

Options: All text, Intro text, Full text
Maximum text length Set the number of characters to trim the text to (html tags are not counted). Set to 0 or leave empty to disable trimming.
Strip HTML tags Select to strip html tags from the articles text (for raw text with no styling / markup)
Readmore link
Enable Readmore tag Select to insert the [readmore] tag by default
Readmore text Override the default Readmore text. Leave empty to use default.
Classname Override the default Readmore classname. Leave empty to use default (readmore).
Div
Embed in a DIV Select to wrap the output in a div tag.
You can use this to align the article and add extra styling to it.
Width Enter a desired width if necessary.
You can use any valid css width value (auto, ...px, ...%).
Numeric values are interpreted as px.
Height Enter a desired height if necessary.
You can use any valid css height value (auto, ...px, ...%).
Numeric values are interpreted as px.
Alignment Define the alignment of the div.

Options: None, Left, Right
Div Classname Enter a classname for the div.
You can use this to style the div and its contents through css.
Content Type Select what content type to use by default

Options: Joomla!, K2

Advanced

Tag Syntax

Article tag The word to be used in the tags.

Note: If you change this, all existing tags will not work anymore.
Articles tag The word to be used in the tags for multiple articles.

Note: If you change this, all existing tags will not work anymore.
Tag Characters The surrounding characters of the tag syntax.

Note: If you change this, all existing tags will not work anymore.

Options: {...}, [...], {{...}}, [[...]], [:...:], [%...%]
Data Tag Characters The surrounding characters of the tag syntax.

Note: If you change this, all existing tags will not work anymore.

Options: {...}, [...], {{...}}, [[...]], [:...:], [%...%]
Force Content Triggers Enable to make Articles Anywhere pass the content generated through the layout data tags to the content plugins before outputting it. Only enable this if you experience issues. Enabling this can cause content plugins to be triggered multiple times and may affect the rendering speed.
Cache DB Queries Select to cache database queries. This can greatly speed up pages for areas that are not cached by Joomla.
Cache Time The maximum length of time in minutes for a cache file to be stored before it is refreshed.
Leave empty to use the Joomla default cache time found in the Global Configuration.

Installation

You can either install Articles Anywhere by using the core extension manager available in the Joomla! Administrator Control Panel, or by using the powerful Regular Labs Extension Manager.

Note: When updating Articles Anywhere, you do not need to uninstall it first. The package will update all the files automatically.

Keep in mind that when you update to a major new version (or uninstall first), you might lose some configuration settings.

Regular Labs Extension Manager

It is very easy to install/update any Regular Labs Extension using the Regular Labs Extension Manager.

Please see the Tutorial for the Regular Labs Extension Manager for more detailed information...

Joomla! Extension Manager

To install via the Joomla! Extension Manager, just follow these steps:

  1. Log into your Joomla administrator;
  2. In the menu, choose: Extensions >> Extensions;
  3. Choose the tab: Install from Web (or enable it if you haven't done so yet);
  4. Select the search field and enter Articles Anywhere and hit enter;
  5. Click on the Articles Anywhere listing;
  6. Click on Install;
  7. Click on Install to confirm.
Joomla! Installer - Install from Web

Or if you need to install the Pro version or cannot install via the 'Install via Web' method for some reason:

  1. Download the extension install file (.zip);
  2. Log into your Joomla administrator;
  3. In the menu, choose: Extensions >> Extensions;
  4. Choose the tab: Upload Package File;
  5. Click on the Choose File button and select the extension zip;
  6. Click on Upload & Install.
Joomla! Installer - Upload Package File

If you have problems installing Articles Anywhere, please try the manual installation process as described here: docs.joomla.org/Installing_an_extension