Every field type has it's own special (optional) parameters to be used in layout.
As you already know to get a field value you need to have filed name enclosed with square brackets, like this: [field_name]
But also you may pass some parameters there.
[field_name:parameters]
Here is a list of field types with their parameters
Field Type: string, multilangstring, text, multilangtext
[field_name : option, parameter1, parameter2]
Option | Parameter1 | Parameter2 | Parameter3 |
chars | Number of chars | Optional «true» to clean what ever inside { } | Optional «true» to clean single and double quotes |
words | Number of words | Optional «true» to clean what ever inside { } | Optional «true» to clean single and double quotes |
firstimage* |
Example 1: [content:words,50,true]
Example 2: [content:firstimage]
* firstimage option will return a link to an image not a tag.
Field Type: article, multilangarticle
[field_name : field, options]
field — is a field from #__content table, «introtext» by default
options - option, parameter1, parameter2
Option | Parameter1 | Parameter2 | Parameter3 |
chars | Number of chars | Optional «true» to clean what ever inside { } | Optional «true» to clean single and double quotes |
words | Number of words | Optional «true» to clean what ever inside { } | Optional «true» to clean single and double quotes |
firstimage |
Example 1: [content:introtext:words,50,true]
Example 2: [content:introtext:firstimage]
Field Type: user, userid
[field_name : field]
field — is a field from #__users table, available values: `name`, `username`, `email`
Example: [userid:email]
Field Type: image
[field_name : image_option,|link|]
image_option — "_thumb", "_original" or some custom option
(you may set/add options in field settings - "Type Options")
link - is an optional parameter to return link only but not image tag
Example 1: [photo:_thumb]
Example 2: [photo:_original,link]
Example 3: [photo:_smallpng]
Field Type: extrasearch
[field_name : |group,list|,|vertical|]
"group" keyword to return value as html tableelement.
"list" keyword to return value as html list (ul) element - recommended.
"vertical" - is an optional parameter render structure in vertical mode
Example 1: [topics] - will return comma separated value
Example 2: [topics:group]
Example 3: [topics:group,vertical]