Haru
Haru

Reputation: 1381

Liquid Template Shopify Not Rendering

Below is my piece of code and I am grabbing some items from the general settings in Shopify. The first variable settings.featured1 in curly bracket pulls the value in but inside the contains statement it doesn't. Any ideas on why?

    <h1>{{ settings.featured1 }}</h1><div class="leftArrow">&#10096</div>
    <div class="shift-scroll">
    {% for collection in collections %}
    {% if collection.handle contains settings.featured1 %}


        {% tablerow product in collection.products limit:8 %}
        <div class="one-third column alpha thumbnail even">
            <a href="{{ product.url | within: collection }}" title="{{ product.featured_image.alt | escape }}">
                <img class="scroll-img" src="{{ product.images.first | product_img_url: 'medium' }}" alt="{{ product.featured_image.alt | escape }}" />

            </a>
        </div>
        {% endtablerow %}
  {% endif %}
  {% endfor %}
  </div>

Upvotes: 1

Views: 772

Answers (1)

Haru
Haru

Reputation: 1381

Jacob's answer led me in the right direction. I had to downcase the setting var.

  {% assign search_term = settings.featured2 | downcase %}
  {% for collection in collections %}
  {% if collection.handle contains search_term %}

Upvotes: 1

Related Questions