Hi,
I have several multi enum fields, which I want to enclose in PDF output. As an example, in my template I use
<ul>{{#each handling}}<li>{{./this}}</li>{{/each}}</ul>
This works well. Unfortunately, because of a data import that I cannot quite change, "handling" contains values like "wissen-vermitteln" (i.e. no capitals, no blanks). As TCPDF obviously takes values directly from the database, I get "wissen-vermitteln" printed in my PDF. What I want, is "Wissen vermitteln" instead. My idea was, to include an #ifEqual in the #each clause, such as
<ul>{{#each handling}}
{{#ifEqual {{./this}} 'wissen-vermitteln'}}
<li>Wissen vermitteln</li>
{{/ifEqual}}
...
{{/each}}</ul>
In fact, I get an error like
Wrong variable naming as '{{./this' in {{#ifEqual {{./this}} ! You should wrap ! " # % & ' * + , ; < = > { | } ~ into [ ]
I cannot figure out, how to do this correctly. Whatever combination of brackets I use, it just does not work.
So, is there a way to use {{./this}} as a variable in this attempt?
Kind regards
I have several multi enum fields, which I want to enclose in PDF output. As an example, in my template I use
<ul>{{#each handling}}<li>{{./this}}</li>{{/each}}</ul>
This works well. Unfortunately, because of a data import that I cannot quite change, "handling" contains values like "wissen-vermitteln" (i.e. no capitals, no blanks). As TCPDF obviously takes values directly from the database, I get "wissen-vermitteln" printed in my PDF. What I want, is "Wissen vermitteln" instead. My idea was, to include an #ifEqual in the #each clause, such as
<ul>{{#each handling}}
{{#ifEqual {{./this}} 'wissen-vermitteln'}}
<li>Wissen vermitteln</li>
{{/ifEqual}}
...
{{/each}}</ul>
In fact, I get an error like
Wrong variable naming as '{{./this' in {{#ifEqual {{./this}} ! You should wrap ! " # % & ' * + , ; < = > { | } ~ into [ ]
I cannot figure out, how to do this correctly. Whatever combination of brackets I use, it just does not work.
So, is there a way to use {{./this}} as a variable in this attempt?
Kind regards
Comment