To render the entire text from the article you can use the [text]
tag.
You can also decide to only show the [introtext]
(the text part above the readmore bar, if present) or the [fulltext]
(the text part below the readmore bar, if present).
Additionally, with any text data tag - like [text]
, [introtext]
, [fulltext]
, [title]
, [metakey]
, [metadesc]
, and even custom fields such as text
, textarea
and editor
, you have the following features at your disposal:
Limiting and stripping text
You can limit any text data tag to only show a certain amount of characters. HTML tags and images are not counted, only the text itself.
Limit by characters
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:
[text paragraphs="2"]
Add Ellipsis
If you decide to limit the text to a certain amount of characters/words, you can append ...
dots to the end of the text.
You can do so with an add-ellipsis
attribute, giving it a value of true
or false
depending on your preference:
[text limit="100" add-ellipsis="true"]
Strip HTML tags
If you want to remove the HTML tags from the text, you can do:
[text strip="true"]
[text characters="100" strip="true"]
Strip 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"]
Offset Headings
When including the text of multiple articles inside another article, you might want to shift the heading tags of the placed articles to a lower level.
You can offset the level of the headings in text data tags by using an offset_headings
attribute. For instance, to convert H1 to H3, H2 to H4 and so on, set the attribute to 2:
[text offset_headings="2"]
Headings will be a minimum of 1 and a maximum of 6. So if you have headings going up to H6, then with offset_headings="1"
both H5 and H6 will become H6.
Article Page breaks
In Joomla you can split the text of an article 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"]