Linkto

The linkto tag is used to switch to a specific template or section

Linkto tags can be used to jump to other templates or to jump to a specific section in the same or another template.

To jump to the template benefit in kind, following code can be used.

{% linkto period.reconciliations.benefit_in_kind %}
  link to template benefit in kind 
{% endlinkto %}

Unless the specified target does not exist, the text within your linkto statement will be blue in output.

Output

In order to jump to a specific section of a template, you should define the target. As an example we want to jump to the additional explanation section in template benefit in kind.

{% linkto period.reconciliations.benefit_in_kind target:"Additional_explanation" %}
  link to additional explanation of benefit in kind 
{% endlinkto %}

In the target template you should define the target ID.

{::target id="Additional_explanation"}Additional explanation{:/target}

Linkto tags can jump to specific account template.
To jump to the first account starting 100008, following code can be used.

{% linkto period.accounts.100008.first %}Link to account{% endlinkto %}
316316

External link

You can also use an external link as a linkto variable. It's obligated to use http:// or https:// in your url

{% linkto "https://www.silverfin.com" %}Silverfin{% endlinkto %}
Output

Linkto as:button

You can also use an external link as a linkto variable and turn it into a clickable button. Do not forget it is always compulsory to use https:// or http:// in your url.

{% assign developer_site = "Developer Site" %}

{% linkto "https://developer.silverfin.com/docs/content" as:button %}{{ developer_site }}{% endlinkto %}
Output

Open link in a new tab

By default, the linkto tag will open the link destination in the current tab of your browser. In order to open it in a new tab, we can use the attribute new_tab and set it to true:

{% linkto "https://developer.silverfin.com/docs/content" new_tab:true %}Developer's site{% endlinkto %}

Please note that you cannot pass a variable to new_tab; it needs to be true or omitted altogether.