Correct syntax for an OR conditional within a Matrix block I have a dropdown Matrix block and need to check whether a selected value is either one or another.  If either value is selected I want to display some text on the front end.  At the moment I have {% if block.wellFormattedContent =='toBeActioned' OR block.wellFormattedContent =='partiallyActioned' %} but it errors.  Hopefully you can see what i'm trying to do.

Thanks

Martin
As already noted by @Benjammin' in the comments, the or operator has to be lowercase. See Logic Expressions in the Twig docs:


  Operators are case sensitive.


You also have to get the dropdown value explicitly by accessing its value property.

{% if block.wellFormattedContent.value == 'toBeActioned' or block.wellFormattedContent.value == 'partiallyActioned' %}


The short syntax {{ block.wellFormattedContent }} (which internally uses the field's toString() magic method) causes problems within Twig conditionals. You can probably also get around this issue by wrapping it in curly braces.

{% if (block.wellFormattedContent) == 'toBeActioned' or (block.wellFormattedContent) == 'partiallyActioned' %}