title: If, elsif, else: Limitations? Liquid
body: <p>Trying to create an <code>if</code>, <code>elseif</code> statement using the <a href="http://liquidmarkup.org/" rel="nofollow">Liquid Templating Ruby engine</a> It appears to be coded correctly but I am not experiencing the results I am expecting.</p>
  
  <p>Im expecting when a user clicks on a collection (MLB, NBA, etc) the <code>{% collection.handle</code> contains <code>"mlb" %}</code> will trigger and its respective code block will come into play.</p>
  
  <p>Is there anything that jumps out to anyone as incorrect with this if statement?</p>
  
  <pre><code>&lt;div class="carousel-wrap"&gt;
  
  &lt;!-- College Slider --&gt;
  
  {% if page.handle or collection.handle contains "collegiate" %}
  &lt;div style="margin-bottom:10px;" class="teams-carousel clearfix" id="ncaa-carousel"&gt;
  &lt;ul class="items clearfix"&gt;
      {% for link in linklists.team-carousel.links %}
          &lt;li&gt;
              {% capture src %}team-{{ link.title | handleize }}.png{% endcapture %}
              &lt;a href="{{ link.url }}" style="background-image: url('{{ src | asset_url }}');"&gt;&lt;/a&gt;
          &lt;/li&gt;
      {% endfor %}
  &lt;/ul&gt;
  &lt;/div&gt;
  
  {% elsif collection.current_type or collection.handle contains "mlb" %}
  
  &lt;!-- MLB Slider --&gt;
  
  
  &lt;div style="margin-bottom: 10px; display: block !important;" class="teams-carousel" id="mlb-carousel"&gt;
  &lt;ul class="items clearfix"&gt;
      {% for link in linklists.mlb.links %}
          &lt;li&gt;
              {% capture src %}team-{{ link.title | handleize }}.png{% endcapture %}
              &lt;a href="{{ link.url }}" style="background-image: url('{{ src | asset_url }}');"&gt;&lt;/a&gt;
          &lt;/li&gt;
      {% endfor %}
  &lt;/ul&gt;
  &lt;/div&gt;
  
  {% elsif collection.current_type or collection.handle contains "nba" %}
  
  &lt;!-- NBA Slider --&gt;
  
  &lt;div style="margin-bottom:10px;" class="teams-carousel clearfix" id="nba-carousel"&gt;
  &lt;ul class="items clearfix"&gt;
  {% for link in linklists.nba-team-carousel.links %}
          &lt;li&gt;
              {% capture src %}team-{{ link.title | handleize }}.png{% endcapture %}
              &lt;a href="{{ link.url }}" style="background-image: url('{{ src | asset_url }}');"&gt;&lt;/a&gt;
          &lt;/li&gt;
      {% endfor %}
  &lt;/ul&gt;
  &lt;/div&gt;
  
  {% elsif collection.current_type or collection.handle contains "nhl" %}
  
  &lt;!-- NHL Slider --&gt;
  
  &lt;div style="margin-bottom:10px;" class="teams-carousel clearfix" id="nhl-carousel"&gt;
  &lt;ul class="items clearfix"&gt;
      {% for link in linklists.nhl.links %}
          &lt;li&gt;
              {% capture src %}team-{{ link.title | handleize }}.png{% endcapture %}
              &lt;a href="{{ link.url }}" style="background-image: url('{{ src | asset_url }}');"&gt;&lt;/a&gt;
          &lt;/li&gt;
      {% endfor %}
  &lt;/ul&gt;
  &lt;/div&gt;
  
  {% elsif collection.current_type or collection.handle contains "mls" %}
  
  &lt;!-- MLS Slider --&gt;
  
  &lt;div style="margin-bottom:10px;" class="teams-carousel clearfix" id="mls-carousel"&gt;
  &lt;ul class="items clearfix"&gt;
      {% for link in linklists.mls.links %}
          &lt;li&gt;
              {% capture src %}team-{{ link.title | handleize }}.png{% endcapture %}
              &lt;a href="{{ link.url }}" style="background-image: url('{{ src | asset_url }}');"&gt;&lt;/a&gt;
          &lt;/li&gt;
      {% endfor %}
  &lt;/ul&gt;
  &lt;/div&gt; 
  
  {% endif %}
  &lt;/div&gt;
  </code></pre>