We have a field_boolean (boolean field) on an ECK Bundle on the article content type. While doing research we came across the question "How to test for a boolean field in a twig template?" but it does not solve my problem.
What is the appropriate way to check for the boolean value?
We have attempted but they don't work:
{% if entity.field_boolean == True %}
{% if '1' in entity.field_boolean[0] %}
These appear to work, but not sure it is correct approach.
{% if entity.field_boolean[#items].value == '1' %}
{% if entity.field_boolean[#items].value %}
{% if node.field_foo.value === ... %}
?==
orsame as
should work.same as
is like===
. twig.symfony.com/doc/2.x/tests/sameas.html