【发布时间】:2019-07-31 18:30:07
【问题描述】:
我在 shopify 上嵌入了一个 klaviyo 表单,它在我正在处理的商店的主页上显示了两次。我是 shopify 开发的新手,但知道 django 和一点 rails,但仍然对阅读代码感到困惑。
<div class="homepage-page {{ section.settings.homepage_page_color }}" data-section-id="{{ section.id }}" data-section-type="index-page">
<!-- form -->
<div id="shopify-section-1538847772051" class="shopify-section adjust--white">
<div class="klaviyo-form-LLvHeC"></div>
</div>
{% for block in section.blocks %}
<div class="wrapper">
<div class="grid">
{% case block.type %}
{% when 'page' %}
{% if block.settings.home_page_content != blank %}
{% assign page = pages[block.settings.home_page_content] %}
{% assign page_src = page.content | escape %}
{% if page_src contains '<img' %}
{% assign homepage_page_grid = 'one-whole' %}
{% else %}
{% assign homepage_page_grid = 'large--five-sixths push--large--one-twelfth' %}
{% endif %}
<div class="grid__item {{ homepage_page_grid }}">
{% if block.settings.home_page_show_title %}
<h4 class="home__subtitle">{{ page.title }}</h4>
{% endif %}
<div class="rte homepage-page__content">
{% unless page == blank or page.empty? %}
{{ page.content }}
{% else %}
{{ 'home_page.onboarding.no_content' | t }}
{% endunless %}
</div>
</div>
{% endif %}
{% when 'text' %}
<div class="grid__item large--five-sixths push--large--one-twelfth">
<div class="rte homepage-page__content">
{% if block.settings.home_page_richtext != blank %}
{{ block.settings.home_page_richtext }}
{% else %}
{{ 'home_page.onboarding.no_content' | t }}
{% endif %}
</div>
</div>
{% else %}
{% endcase %}
</div>
</div>
{% endfor %}
{% if section.blocks.size == 0 %}
<div class="wrapper">
<div class="grid">
<div class="grid__item">
<div class="rte homepage-page__content">
{{ 'home_page.onboarding.no_content' | t }}
</div>
</div>
</div>
</div>
{% endif %}
</div>
{% schema %}
这段代码的哪一部分是显示第二种形式的那部分?
这是上面的表格
这是我不需要的表单,靠近页脚
【问题讨论】:
标签: ruby-on-rails django jinja2 shopify shopify-template