Hi,
I wanted a table with a dynamic amount of rows (in input) but with a certain minimal amount of rows in output. For those who would like to have something similar, this working code could be a starting point:
´´´
{% assign int_AantalRijen_Minimum = 10 %}
{% stripnewlines %}
{% newline %}|Kolom A|Kolom B
{% newline %}|:-----:|:-----:#+
{% fori item in custom.waarden %}
{% assign int_ExistingRows_Counter = int_ExistingRows_Counter | plus:1 %}
{% newline %}
|
{% input item.Waarden_A %}
|
{% input item.Waarden_B %}
{% endfori %}
{% if int_ExistingRows_Counter <= int_AantalRijen_Minimum %}
{% comment %}Step: Tel rij bij (anders komen we aan altijd één te veel{% endcomment %}
{% assign int_ExistingRows_Counter = int_ExistingRows_Counter | plus:1 %}
{% comment %}Step: Maak (int_AantalRijen_Minimum - int_ExistingRows_Counter) aantal rijen bij{% endcomment %}
{% for int_RowsCounter in (int_ExistingRows_Counter…int_AantalRijen_Minimum) %}
{% nic %}
{% newline %}
|
|
{% endnic %}
{% endfor %}
{% endif %}
{% endstripnewlines %}
´´´