2015-11-24 17:25:14 +01:00
|
|
|
|
The `Url` field formatter can take on the following types:
|
|
|
|
|
|
2016-06-30 23:32:21 +02:00
|
|
|
|
* The *Link* type turn the contents of the field into an URL.
|
2015-11-24 17:25:14 +01:00
|
|
|
|
* The *Image* type can be used to specify an image directory where a specified image is located.
|
|
|
|
|
|
2016-06-30 23:32:21 +02:00
|
|
|
|
You can customize either type of URL field formats with templates. A _URL template_ enables you to add specific values
|
2015-11-24 17:25:14 +01:00
|
|
|
|
to a partial URL. Use the string `{{value}}` to add the contents of the field to a fixed URL.
|
|
|
|
|
|
|
|
|
|
For example, when:
|
|
|
|
|
|
|
|
|
|
* A field contains a user ID
|
|
|
|
|
* That field uses the `Url` field formatter
|
|
|
|
|
* The URI template is `http://company.net/profiles?user_id={{value}}`
|
|
|
|
|
|
|
|
|
|
The resulting URL replaces `{{value}}` with the user ID from the field.
|
|
|
|
|
|
2016-06-30 23:32:21 +02:00
|
|
|
|
The `{{value}}` template string URL-encodes the contents of the field. When a field encoded into a URL contains
|
|
|
|
|
non-ASCII characters, these characters are replaced with a `%` character and the appropriate hexadecimal code. For
|
2015-11-24 17:25:14 +01:00
|
|
|
|
example, field contents `users/admin` result in the URL template adding `users%2Fadmin`.
|
|
|
|
|
|
2016-06-30 23:32:21 +02:00
|
|
|
|
When the formatter type is set to *Image*, the `{{value}}` template string specifies the name of an image at the
|
2015-11-24 17:25:14 +01:00
|
|
|
|
specified URI.
|
|
|
|
|
|
|
|
|
|
In order to pass unescaped values directly to the URL, use the `{{rawValue}}` string.
|
|
|
|
|
|
2016-06-30 23:32:21 +02:00
|
|
|
|
A _Label Template_ enables you to specify a text string that displays instead of the raw URL. You can use the
|
2015-11-24 17:25:14 +01:00
|
|
|
|
`{{value}}` template string normally in label templates. You can also use the `{{url}}` template string to display
|
|
|
|
|
the formatted URL.
|