The Pro version of Content Templater comes with several data tags that you can use in your template, that will be inserted automatically in the content the moment you insert the template.
Note that these data tags will be replaced with the actual value when inserted in the article. They will not remain dynamic when you change the article data itself. If you need to place dynamic tags that do not get hardcoded into the article text, you can use ReReplacer instead.
Here is a complete overview of all of the available Data Tags and their syntax:
| Input Syntax | Description | Output Example |
|---|---|---|
[[user:id]] |
The ID number of the current logged-in user. * | 465 |
[[user:username]] |
The login name of the current logged-in user. * | peter |
[[user:name]] |
The name of the current logged-in user. * | Peter van Westen |
[[user:misc]] |
Any other available data field from the current logged-in user or the connected contact. * |
I'll sell you good copper, which is cheaper... well, here it is. |
[[article:id]] |
The ID number of the current article. ** | 123 |
[[article:title]] |
The title of the current article. ** | My Article |
[[article:alias]] |
The alias of the current article. ** | my-article |
[[article:custom-field]] |
The output of any custom field from the current article. ** | Value of my Custom Field |
[[article:custom-field:value]] |
The raw value of any custom field from the current article. ** | Value of my Custom Field |
[[date:%A, %d %B %Y]][[date:%Y-%m-%d]] |
Date using the extension's supported strftime-style format tokens. | Monday, 05 September 2022 2022-09-05 |
[[random:0-100]][[random:1000-9999]] |
This places a random number within the given range. | 42 5831 |
[[random:this,that]][[random:1-10,20,50,100]] | A random value from a list of strings, numbers, or ranges. | that 7 |
[[template:...]] |
Content of another Content Templater template. Example: [[template:2]] or [[template:My second template]] |
(the content of given template) |
[[escape]]...[[/escape]] | Escape special characters in the text within the tags. | "It\'s a string!" |
[[uppercase]]...[[/uppercase]] | Convert the text within the tags to uppercase. | "IT'S A STRING!" |
[[lowercase]]...[[/lowercase]] | Convert the text within the tags to lowercase. | "it's a string!" |
[[notags]]...[[/notags]] | Remove HTML tags from the text within the tags. | "It's a string!" |
[[nowhitespace]]...[[/nowhitespace]] | Remove HTML tags and whitespace from the text within the tags. | "It'sastring!" |
[[toalias]]...[[/toalias]] | Convert the text within the tags to a URL-safe alias. | its-a-string |
[[replace from="string" to="different word"]]...[[/replace]] | Search and replace inside the text within the tags. | "It's a different word!" |
* The user data tags place data from the logged-in user (the user that chooses the template).
** The article data tags are only available when editing an existing article. When creating a new article, you need to first save the article before applying the template.