Answers.Body: <p>You want:</p>
  
  <pre><code>{% if craft.request.firstSegment == 'This' or craft.request.firstSegment == 'That' %}
  </code></pre>
  
  <p>or this would work:</p>
  
  <pre><code>{% if craft.request.firstSegment in ['This', 'That'] %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-17T02:38:56.177Z
Answers.LastActivityDate: 2015-06-17T02:38:56.177Z
Answers.UserDisplayName: Marion Newlevant
Body: <p>I'm trying to use a conditional to do something if the first segment matches This <em>or</em> That. But I'm unable to come up with the right operator for the "or"</p>
  
  <pre><code>{% elseif craft.request.firstSegment == 'This' || 'That' %}
  </code></pre>
  
  <p>What's the proper operator here? Thanks!</p>
  
Tags: <templating><conditional>
Title: Comparison "or" conditional
ThreadText: # Comparison "or" conditional
  
  (Asked by: username_0 on 2015-06-17)
  
  I'm trying to use a conditional to do something if the first segment matches This *or* That. But I'm unable to come up with the right operator for the "or"
  
  ```
  {% elseif craft.request.firstSegment == 'This' || 'That' %}
  
  ```
  
  What's the proper operator here? Thanks!
  
  **Tags:** templating, conditional
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-06-17. Score: 12 | Accepted answer
  
  You want:
  
  ```
  {% if craft.request.firstSegment == 'This' or craft.request.firstSegment == 'That' %}
  
  ```
  
  or this would work:
  
  ```
  {% if craft.request.firstSegment in ['This', 'That'] %}
  
  ```
  
  
  ---
  
  