Signature layout

Hi !
I’m trying to put the name in bold and to delete the space that I have in the Word export.

I have this :


But I wanted to have this :


Here is the code :

{% assign date_jaarverslag = custom.verslag.date %}
{% assign count = 0 %}
{% assign names = "" %}
{% assign keys = "" %}
{% assign signatures = "" %}

{% for person in period.directors %}
  {% capture signmarkers %}{% signmarker name:person.name %}{% endcapture %}
  {% assign show_begin_mandat = false %}
  {% assign show_end_mandat = false %}
  {% assign begin_mandat = person.director_start_date %}
  {% assign end_mandat = person.director_end_date %}
    {% if date_jaarverslag >= begin_mandat or begin_mandat == blank %}
      {% assign show_begin_mandat = true %}
    {% endif %}
    {% if date_jaarverslag <= end_mandat or end_mandat == blank %}
      {% assign show_end_mandat = true %}
    {% endif %}
      {% if show_begin_mandat and show_end_mandat %}
          {% assign count = count | plus:1 %}
          {% assign names = names | append:person.name %}
          {% assign signatures = signatures | append: signmarkers | append:"<br>" | append:"<br>" | append:"<br>" | append:person.name %}
        {% if person.custom.represented_by_name != blank %}
          {% assign names = names | append:" Représenté par " | append:person.custom.represented_by_name %}
          {% assign signatures = signatures | append:"<br>" | append:"Représenté par " | append:person.custom.represented_by_name %}
          {% endif %}
        {% if person.statutory == true %}
          {% if NV or CVBA or CVOA or VZW %}
            {% assign signatures = signatures | append:"<br>" | append:"Administrateur délégué" %}
          {% else %}
            {% assign signatures = signatures | append:"<br>" | append:"Gérant délégué" %}
          {% endif %}
        {% else %}
          {% if NV or CVBA or CVOA or VZW %}
            {% assign signatures = signatures | append:"<br>" | append:"Administrateur" %}
          {% else %}
            {% assign signatures = signatures | append:"<br>" | append:"Gérant" %}
         {% endif %}          
        {% endif %}
        {% unless forloop.last %}
          {% assign names = names | append:"|" %}
        {% endunless %}
          {% assign keys = keys | append:person.name.key %}
        {% unless forloop.last %}
          {% assign keys = keys | append:"|" %}
        {% endunless %}
        {% unless forloop.last %}
          {% assign signatures = signatures | append:"|" %}
        {% endunless %}
      {% endif %}
{% endfor %}

{% assign zkv_signatures = signatures | split:"|" %}

Could you help me ?

Thanks,

Ludovic

Helo @Ludovic,

The issue is that you take all the database variables (such as names) into one long array, and after you’ve done this, you can’t really say that only the names have to be bold (which is done by double asterix around the database variable by the way). Well, actually, there is, but I’d rather you’d go for this instead (just an example):

{% assign names = "" %}

{% for person in period.directors %}
  {% capture name %}**{{ person.name }}**{% endcapture %}
  {% assign names = names | append:name %}
{% if person.custom.represented_by_name != blank %}
  {% assign names = names | append:"<br><br>" | append:"Represented by " | append:person.custom.represented_by_name %}
{% endif %}
{% unless forloop.last %}
  {% assign names = names | append:"|" %}
{% endunless %}
{% endfor %}

{{ names }}

So, first you capture the name in bold in the local variable name and then you use the output of that code (that’s a capture - simply an output of some combination of code) to put it in the array “names”.

That way, you can have the desired output.

Let me know if this works out for you.

Hi @sven ,

It works partly.
The names are in bold but I still have spaces in the Word export (red crosses). How can I delete them ?

Capture1

It’s maybe due to my function call.
There it is :

{% assign columns = 2 %}
{% assign aantal_zaakvoerders = count %}
{% if aantal_zaakvoerders > columns %}{% assign aantal_kolommen = columns %}{% else %}{% assign aantal_kolommen = aantal_zaakvoerders %}{% endif %}

{% stripnewlines %}
{% newline %}
|{% for i in (1…aantal_kolommen) %}----{{ 100/aantal_kolommen | integer }}%------|{% endfor %}+
{% newline %}
|

{% for signature in zkv_signatures %}
{{ signature }}

|
{% assign modulo = forloop.index | modulo:2 %}
{% if modulo == 0 %}
{% unless forloop.last %}
{% newline %}
|
{% newline %}
|
{% newline %}
|
{% newline %}
|
{% endunless %}
{% endif %}
{% endfor %}
{% newline %}
|
{% newline %}
|
{% endstripnewlines %}

Thanks,

Hi Ludo

Could you try putting the code

{% for person in period.directors %}
...
{% endfor %}

from your first post between stripnewlines?

Like this:

{% stripnewlines %}
    {% for person in period.directors %}
    ...
    {% endfor %}
{% enstripnewlines %}

Kind regards
Sam

Hi Sam,

I have just tried and it doesn’t work. I have the same result that without this code.

Capture2

It the code that @sven send, you might want to change:

{% assign names = names | append:"<br><br>" | append:"Represented by " | append:person.custom.represented_by_name %}

into

{% assign names = names | append:"<br>" | append:"Represented by " | append:person.custom.represented_by_name %} 

Hopefully this will solve it.

Kind regards
Sam

Yeah, it works !

Thanks a lot :smiley:

Ludo