I am trying to generate a PDF with Entity Print. Until then all is well.
In my Twig page, I try to make conditional displays. But I can’t get the conditions to work.
I render my fields using {{ content.field_custom }} and that also works fine.
But the condition don't work , when I do something like :
{% if content.field_custom == 'John' %} ...
or
{% set field = content.field_custom %}
{% if field == 'John' %}
<p>Hello</p>
{% endif %}
I need to do this in the fields twig template, can someone help me?
Many thanks