In a custom views-view-fields.html.twig I do print a list field (field_status) without issues. The values are:
new|New
old|Old
But if i want to do an if/else statement for printing different div containers i do get always printed the div container from else. Does anybody have an idea what i am doing wrong? I tried it too with module Twig Field Value, but i do have the same issues.
<div class="card h-100">
<div class="card-body">
{% if fields.field_status.content == 'new' %} // |striptags , |raw or a capital value e.g. New do not work , Twig Field Value also do not work: content.field_status|field_value
<div class="icon medium">
NEW
</div>
{% else %}
<div class="icon medium">
OLD
</div>
{% endif %}
<h5 class="card-title">{{ fields.title.content }}</h5>
</div>
</div>
Thanks for helping!