How to display a field only if option (x) isn't selected In one of my content types, I have a Status field (field_status) which is a List(text) field displaying 3 radio button options set to the following key|label values:


0|In Stock
1|Under Deposit
2|Sold


I have a custom twig template file for this content type and was wondering how I would display the value if the option isn't 0 (In Stock). In Stock is pretty much the default option so when the item is sold/under deposit, I want a "Sold/Under Deposit" banner to appear in the upper corner of the picture of the item.

Also, I have a view displaying a list of these content types so how would I only show this value again if the selection isn't "In Stock". I don't have a custom template for the view as I did it all in the UI so I'm hoping there's a way to do this there as well.

I feel like this should be a simple solution but for some reason I'm having issues with it.

I figured it would be something like the following but this doesn't seem to work:

{% if field_status is not ['0'] %}
  {{ field_status }}
{% endif %}


I'm assuming my syntax is wrong. What would be the proper way of doing this?
Create a file in template folder : node--articles.html.twig

             {% if content.field_gif_image|render is not empty %}
             &lt;div class="field-image-wrapper article-gif"&gt;{{ content.field_gif_image }}&lt;/div&gt;
             {% elseif content.field_image|render is not empty %}
             &lt;div class="field-image-wrapper"&gt;{{ content.field_image }}&lt;/div&gt;
             {% endif %}
             {{ content.body }}
             {{ content.field_more_on }}


Fields defined are just for reference, hope It can give you a clue of how to do this.