Answers.Body: <p>As already noted by @Benjammin' in the comments, the <code>or</code> operator has to be lowercase. See <a href="http://twig.sensiolabs.org/doc/templates.html#logic" rel="nofollow">Logic Expressions</a> in the Twig docs:</p>
  
  <blockquote>
    <p>Operators are case sensitive.</p>
  </blockquote>
  
  <p>You also have to get the dropdown value explicitly by accessing its <code>value</code> property.</p>
  
  <pre><code>{% if block.wellFormattedContent.value == 'toBeActioned' or block.wellFormattedContent.value == 'partiallyActioned' %}
  </code></pre>
  
  <p>The short syntax <code>{{ block.wellFormattedContent }}</code> (which internally uses the field's <code>toString()</code> magic method) causes problems within Twig conditionals. You can probably also get around this issue by wrapping it in curly braces.</p>
  
  <pre><code>{% if (block.wellFormattedContent) == 'toBeActioned' or (block.wellFormattedContent) == 'partiallyActioned' %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-20T11:43:55.017Z
Answers.Text: Thanks Carl (again)  :D  - Should also note Benjammin point that the OR should be lowercase.
Answers.UserDisplayName: Martin
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-20T12:33:59.353Z
Answers.Text: Good to know, I thought it doesn't matter. Thanks @Martin and @Benjammin!
Answers.UserDisplayName: carlcs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-20T11:17:47.310Z
Answers.LastActivityDate: 2016-01-20T12:39:27.933Z
Answers.LastEditDate: 2016-01-20T12:39:27.933Z
Answers.UserDisplayName: carlcs
Body: <p>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 <code>{% if block.wellFormattedContent =='toBeActioned' OR block.wellFormattedContent =='partiallyActioned' %}</code> but it errors.  Hopefully you can see what i'm trying to do.</p>
  
  <p>Thanks</p>
  
  <p>Martin</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-01-20T10:59:56.363Z
Comments.Text: Try `or` in lowercase. You can learn more about the templating language here http://twig.sensiolabs.org/documentation
Comments.UserDisplayName: Ben Fleming
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-01-20T11:02:55.053Z
Comments.Text: Also, if you haven't done so already, turn on dev mode in your config file (add the line `'devMode' => true,`), it'll give you much more descriptive errors making debugging so much easier!
Comments.UserDisplayName: Ben Fleming
Tags: <matrix><conditional>
Title: Correct syntax for an OR conditional within a Matrix block
ThreadText: # Correct syntax for an OR conditional within a Matrix block
  
  (Asked by: username_0 on 2016-01-20)
  
  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
  
  username_0
  
  **Tags:** matrix, conditional
  
  > **Comments:**
  > **username_1**: Try `or` in lowercase. You can learn more about the templating language here http://twig.sensiolabs.org/documentation  
  > **username_1**: Also, if you haven't done so already, turn on dev mode in your config file (add the line `'devMode' => true,`), it'll give you much more descriptive errors making debugging so much easier!  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2016-01-20. Score: 2 | Accepted answer
  
  As already noted by @Benjammin' in the comments, the `or` operator has to be lowercase. See [Logic Expressions](http://twig.sensiolabs.org/doc/templates.html#logic) 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' %}
  
  ```
  
  > **Comments:**
  > **username_0**: Thanks Carl (again)  :D  - Should also note Benjammin point that the OR should be lowercase.  
  > **username_2**: Good to know, I thought it doesn't matter. Thanks @username_0 and @Benjammin!  
  
  ---
  
  