Template Update

Hello,

Silverfin performs updates on templates, we have a button to update the template.

Is it possible to do the same for a custom template? If yes, how ? Does it also work for texts?

Thanks,

kind regards

Hi @THANAS

When Silverfin marks a template update as “significant”, this update needs to be accepted on firm level indeed. Since custom templates only exist on firm level it is not possible to do this for your custom templates or texts.

In the case of previously locked periods, you can see a button to update templates on client level.
You’ll only see this button if: you first lock the period, then update template code, then unlock said period. This appears automatically on (custom) templates, but not on texts.

I hope that answers your question,
kind regards,
Romy

hey @Romy_Vermeeren,

If I understand correctly, we don’t know update a custom template? We have to create a new template?

Kind regards,

Hey @THANAS
I’m not sure I understand exactly what you are trying to do.
Can you give a bit more context perhaps?

Any administrator in your firm can update the code of custom templates, when you click “save” this update will take immediate effect in all files where the template is used.
If you don’t want the update to impact all your files, you could isolate the piece of code you want to change, and put it in a condition.
E.g. only run the new code starting from a specific date, or when a boolean is ticked etc.

Kind regards,
Romy

hey @Romy_Vermeeren,

You have described exactly what I want. Run a new code starting from a specific date.

I have a template that needs to be updated every year.

Thank’s a lot,

Hey @Romy_Vermeeren ,

I didn’t get any feedback about the code ?

thank’s a lot

Hi @THANAS,

To only run a new piece of code starting from a specific date you need to put the old and new piece of code into an if-condition that will look something like this:

{% assign end_date = period.end_date | date: "%Y/%m/%d" %}
{% assign change_date = "2022/01/01" | date: "%Y/%m/%d"   %}

{% if end_date < change_date %}
  OLD CODE
{% else %}
  NEW CODE
{% endif %}

If these are large pieces of code you could also opt to put the old and the new code in a separate part and put the if-condition in the main part of the template code:

{% if end_date < change_date %}
  {% include "parts/old_code" %}
{% else %}
  {% include "parts/new_code" %}
{% endif %}

You can find some more information about using parts here: CASE: use parts to avoid repetitive coding

Kind regards,
Kimberly

@Kimberly_Vlietinck ,

Thank’s a lot!