Link Syntax
To insert hyperlinks in your template, use a link tag. Link tag syntax is the same as a simple text tag:
{{ MyLink }}
What makes it a link is the JSON data, that follows a specific structure:
{
"MyLink": {
"_type": "link",
"target": "https://example.com",
"text": "Click here", // optional
"tooltip": "Visit our website" // optional
}
}
The text
and tooltip
fields are optional. If text
is not provided, the target
URL will be used as the link text.
Simple Example
{
"MyLink": {
"_type": "link",
"target": "https://example.com"
}
}
This will create a link with the text "https://example.com"
Custom Text and Tooltip
{
"MyLink": {
"_type": "link",
"target": "https://example.com",
"text": "Click here",
"tooltip": "Visit our website"
}
}
This will create a link with the text "Click here" and a tooltip that appears when hovering over the link.