Text options can be applied to text-bearing user, profile, and published-contact data tags, such as [name], [email], and [profile:aboutme]. They also work with text, textarea, and editor user custom fields in Pro.

The examples below use [name] for shared user data and [field:biography] where rich HTML or page breaks are required.

Limiting

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:

[name characters="100"]

Limit by letters

You can also limit based on only the letters, without counting spaces:

[name letters="50"]

Limit by words

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

[name 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:

[field:biography paragraphs="2"]

Select a range

Use start-end to select a range of characters, letters, words, or paragraphs. Positions start at 1 and include both ends. Leave off the end number to continue to the end of the text.

[name characters="2-10"]
[name letters="2-10"]
[name words="2-4"]
[name words="3-"]
[field:biography paragraphs="2-3"]

Paragraph selection requires text containing HTML paragraphs.

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:

[name characters="100" add-ellipsis="true"]

Stripping

Strip HTML tags

If you want to remove the HTML tags from the text, you can do:

[field:biography html="false"]
[field:biography characters="100" html="false"]

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:

[field:biography images="false"]

Line Breaks

Use nl2br="true" to turn line breaks in the text into HTML <br> tags:

[profile:aboutme nl2br="true"]

Add slashes / escape

If you want to add slashes to single and double quotes, you can do:

[name escape="true"]

To only escape single quotes:

[name escape="single"]

And to only escape double quotes:

[name escape="double"]

HTML entities

To convert special characters to HTML entities, use:

[name htmlentities="true"]

Convert Case

For any text data tag, you can convert the casing and capitalization of the text in various ways, by using the convert-case="..." attribute:

SyntaxDescription
[name convert-case="camel"] thisIsAString
[name convert-case="dash"] this-is-a-string
[name convert-case="dot"] this.is.a.string
[name convert-case="lower"] this is a string
[name convert-case="lower-first"] this is a String
[name convert-case="pascal"] ThisIsAString
[name convert-case="title"] This Is A String
[name convert-case="upper"] THIS IS A STRING
[name convert-case="upper-first"] This is a string
[name convert-case="underscore"] this_is_a_string

Offset Headings

When placing rich text from a user custom field inside a page, you may want to shift its heading elements 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:

[field:biography 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.

Search & Replace

You can even search and replace inside any text data tag, by using the replace="..." attribute.

For example, this is the syntax to replace cats with dogs inside the [name] data tag:

[name replace="cats=>dogs"]

If you need to do multiple replacements, you can separate them with a comma:

[name replace="cats=>dogs,kittens=>puppies"]

This can come especially useful to make custom replacements when using the External Database feature.

Replace inside HTML tags

Add replace-html="true" when your search or replacement contains HTML markup. For example, to change bold tags to strong tags:

[field:biography replace="<b>=><strong>,</b>=></strong>" replace-html="true"]

Part of the Text by Element ID PRO

For rich-text custom fields, you can extract one HTML element by its id.

For example:

[field:biography id="my-div"]

This outputs only the element with ID my-div from the custom-field value.

This works with any HTML elements, such as paragraphs, divs, tables, etc.

User Page Breaks PRO

Joomla page breaks can be used inside a user custom field of type Editor, for example a biography field.

You can output these different pages separately via the page attribute.

To output only the third page of the field, use:

[field:biography page="3"]

Or use the given title for that page, like:

[field:biography page="My Third Page"]