How does the Silverfin templating code look like?

The syntax is the "set of language rules" used for programming. By language rules we mean the code that is used by the Silverfin templating language. The syntax shows the way code is structured in Silverfin.





Used to type a word or sentence

Used to print out the value of a variable

{{ ... }}

Used to create logic and control flow

{% ... %}

Used to format your printed text

Plain text

Typing a word in sentence in the Silverfin templating editor will just output that word or sentence as a result.

General meeting
General meeting

Print syntax

If you want to print a variable, you should use the print syntax
{{ variable }}.

In a variable we store a value. For example, to find someone's telephone number, we go to the name of that person (variable), under which, the telephone number (value) is stored.
To display the value we stored in the database, we print the variable.


Let's assume that the variable profit contains the value 999,99

{{ profit }}

Logic syntax

All logic within the Silverfin templating language should be embedded in logic tags {% logic %}.

Logic tags are the programming logic that tells templates what to do. To find out more about the logic that you can include in the code, please see the following page: Tags


Let's assume that the variable profit contains the value 999,99

{% if profit >= 0 %}
  You made a profit of {{ profit }}
{% else %}
  You made a loss of {{ profit }}
{% endif %}
You made a profit of 999,99

Style syntax

Next to the basic style components in Silverfin, there are also some styling properties that need a style syntax. The style defines the format of your printed text. For more information please see styling section.