Answers.Body: <p>You've just got quotes wrapped around a simple string. Try something like this instead...</p>
  
  <pre><code>{% if segment1 in ['one','two','three'] %}
  </code></pre>
  
  <p>That will check to see if your <code>segment1</code> value is in the array of possible matches.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-08T09:40:03.430Z
Answers.Text: Super thanks. I got caught out by the "in"!
Answers.UserDisplayName: Simon Clayson
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-02T19:14:45.820Z
Answers.LastActivityDate: 2014-10-02T19:14:45.820Z
Answers.UserDisplayName: Lindsey D
Body: <p>Got myself into a seemingly simple dead-end block with twig syntax. I need to test against multiple items:</p>
  
  <pre><code>{% set segment1 = craft.request.firstSegment %}
  {% if segment1 == 'one OR two OR three' %}
  DO SOMETHING
  {% endif %}
  </code></pre>
  
  <p>What's going wrong with this bit 'one OR two OR three'? brackets?</p>
  
Tags: <templating>
Title: Testing "if" against multiple segments
ThreadText: # Testing "if" against multiple segments
  
  (Asked by: username_0 on 2014-10-02)
  
  Got myself into a seemingly simple dead-end block with twig syntax. I need to test against multiple items:
  
  ```
  {% set segment1 = craft.request.firstSegment %}
  {% if segment1 == 'one OR two OR three' %}
  DO SOMETHING
  {% endif %}
  
  ```
  
  What's going wrong with this bit 'one OR two OR three'? brackets?
  
  **Tags:** templating
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2014-10-02. Score: 9 | Accepted answer
  
  You've just got quotes wrapped around a simple string. Try something like this instead...
  
  ```
  {% if segment1 in ['one','two','three'] %}
  
  ```
  
  That will check to see if your `segment1` value is in the array of possible matches.
  
  > **Comments:**
  > **username_0**: Super thanks. I got caught out by the "in"!  
  
  ---
  
  