Shopify 液体模板不渲染

Shopify 液体模板不渲染,shopify,liquid,Shopify,Liquid,下面是我的一段代码,我正在从Shopify的常规设置中获取一些项目。大括号中的第一个变量settings.featured1将值拉入,但在contains语句中,它没有拉入。你知道为什么吗 <h1>{{ settings.featured1 }}</h1><div class="leftArrow">&#10096</div> <div class="shift-scroll"> {% for colle

下面是我的一段代码,我正在从Shopify的常规设置中获取一些项目。大括号中的第一个变量settings.featured1将值拉入,但在contains语句中,它没有拉入。你知道为什么吗

    <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>
{{settings.featured1}}❰
{集合%中的集合的%s}
{%如果collection.handle包含settings.featured1%}
{集合中有%tablerow产品。产品限制:8%}
{%endtablerow%}
{%endif%}
{%endfor%}

雅各布的回答把我引向了正确的方向。我不得不把设置变量设置为无效

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

settings.featured1的值是多少?它是一个字符串值。我想我的想法是你的collection.handle与settings.featured1不同。例如,它看起来像shopify删除了所有特殊字符,并将一个值从“Cool Page”更改为“Cool Page”Hmmm,settings.featured1只是存储在shopify上的设置中的一个变量。