Code formatting
Don´t do:
{%assign test="content"%}
{%if test!=variable_1%}
Do:
{% assign test = "content" %}
{% if test != variable_1 %}
Don´t do:
< td >content< /td >
<td class="usr-align-right"colspan="2">content</td>
Do:
<td>content</td>
<td class="usr-align-right" colspan="2">content</td>
SnippetsYou can use hotkeys to add tags. For example type assign and hit tab and the editor will create:
{% assign variable = content %}
The spacing in these snippets is already correct!
Don't do this:

One tag, no indentation
<tr>
<td>{{ item | currency }}</td>
<td>Jack Russell</td>
</tr>
Multiple tags, indentation.
<tr>
<td>
{% for item in my_collection %}
{{ item.value }}
{% endfor %}
</td>
<td><b>Jack Russell</b></td>
</tr>
Don't do:
{% input custom.langlopendeschulden.text default:langlopendeschulden_default %}
{% t= "t_organized_events_text" %}
Do:
{% input custom.long_term_debts.amount default:long_term_debts_default %}
{% t= "t_organised_events_text" %}
Don't do:
{% assign MyVariableName = "Investments" %}
{% assign 2_BankAccount = "550002" %}
{% assign US$_BankAccount = "550002" %}
art_privacy_1
art_privacy_2
Do:
{% assign my_variable_name = "investments" %}
{% assign second_bank_account = "550002" %}
{% assign usd_bank_account = "550002" %}
art_privacy_employers
art_privacy_employees
Don't do:
{% result "result_depr_by" $5 %}
Do:
{% result "total_depreciations_bookyear" total_depreciations_bookyear %}
Don't do:
{% capture title %}{{ varia.title }}{% endcapture %}
{% assign current = current_reconciliation.handle %}
{% assign privacy_2 = custom.[curr_rt].privacy_2 %}
{% assign privacy_3 = custom.[current].privacy_3 %}
Do:
{% comment %}The dynamic variable "directors_id" is built as follows to ensure unique values: director_{{ person.id }} resulting in: director_4658423{% endcomment %}
{% capture directors_id %}director_{{ person.id }}{% endcapture %}
{% capture title %}title_{{ varia.key }}{% endcapture %}
{% assign current_template = current_reconciliation.handle %}
{% assign privacy_art_employees = custom.[current_template].privacy_art_employees %}
{% comment %} Display the relevant code depending on tax years {% endcomment %}
{% if period.fiscal_year == 2021 %}
{% include "parts/ty_2021_code" %}
{% elsif period.fiscal_year == 2022 %}
{% include "parts/ty_2022_code" %}
{% elsif period.fiscal_year == 2023 %}
{% include "parts/ty_2023_code" %}
{% elsif period.fiscal_year == 2024 %}
{::infotext}
{% t "current_ty_not_yet_published_t" cy_fiscal:cy_fiscal %}
{:/infotext}
{% include "parts/ty_2023_code" %}
{% else %}
{% comment %} Any other tax year {% endcomment %}
{{ wrong_taxyear }}
{% endif %}
{% fori person in period_people %}
{% comment %}create needed vars for each person{% endcomment %}
{% assign director = person.director | default:false %}
{% assign shareholder = person.shareholder | default:false %}
{% assign nbr_people = nbr_people | plus:1 %}
{% comment %}in case of a branch, make sure shareholders cannot be entered{% endcomment %}
{% if branch %}
{% assign shareholder = false %}
{% endif %}
{% comment %}create string with their chosen role{% endcomment %}
{% assign txt_roles = "" %}
{% if director %}
{% capture txt_role %}{% t "director_role" %}{% endcapture %}
{% assign role_text = txt_role | split:"," %}
{% assign txt_roles = txt_roles | concat:role_text %}
{% endif %}
{% if shareholder %}
{% capture txt_role %}{% t "shareholder_role" %}{% endcapture %}
{% assign role_text = txt_role | split:"," %}
{% assign txt_roles = txt_roles | concat:role_text %}
{% endif %}
{% capture txt_roles %}{{ txt_roles | join:", " | remove_first: ", " }}{% endcapture %}
{% comment %}
--------------------
NAME PEOPLE DROP
--------------------
{% endcomment %}
<table class="usr-width-100">
<tbody>
<tr>
<td class="usr-line-bottom usr-width-75">
{::font size='m'}**( {{ nbr_people }}. )**{:/font}
{% if person.name != blank %}
{::font size='m'}**{{ person.name }}**{:/font}
{% nic %}
{% if txt_roles != blank %}
{{ some_indent }}
*{{ txt_roles }}*
{% endif %}
{% endnic %}
{% endif %}
</td>
<td class=""> </td>
</tr>
</tbody>
</table>
{% endfori %}
Updated 18 days ago
What’s Next