如何在shopify的一个部分中添加超过16个块?

发布于 2025-01-17 14:49:04 字数 60 浏览 2 评论 0原文

我正在为团队成员建立一个新页面。为其创建了新的部分,并尝试在面板上添加团队成员,但不能添加超过 16 个。

I am building a new page for team members. made new section for it, and try to add a team member on the panel, but can't add more than 16.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

秉烛思 2025-01-24 14:49:04

您不能,16是Shopify设定的硬限制。唯一的方法是在页面上多次使用同一部分。

编辑:Shopify上周将限制从每个部分的16个街区增加到50个街区,并将20个部分增加到每页25个部分。

You can't, 16 is a hard limit set by Shopify. The only way around it is to utilise the same section multiple times on the page.

EDIT: Shopify last week increased the limit from 16 to 50 blocks per section and increased 20 sections to 25 sections per page.

鲜血染红嫁衣 2025-01-24 14:49:04

正如我所见,您可以在一个部分中添加超过 16 个块,但不知道到底有多少个有限块。我还没有找到相关文档。

As I have seen, you could add more than 16 blocks in one section but do not know exactly how many limited blocks. I have not found related document yet.

紫竹語嫣☆ 2025-01-24 14:49:04

是的,我们可以通过提供max_blocks在Shopify中添加超过16个街区。请在您的部分液体文件中使用此代码您要添加这些块。

{%- if section.blocks.size > 0 -%}
  <ul class="brand-carousel section-padding ">
    {%- for block in section.blocks -%}
      <li class="item ">
        {%- if block.settings.link != blank -%}
          <a href="{{ block.settings.link }}">
        {%- endif -%}

          {%- if block.settings.image != blank -%}
            {{ block.settings.image | img_url| img_tag: block.settings.image.alt }}
          {%- else -%}
            {{ 'logo' | placeholder_svg_tag: 'placeholder-svg' }}
          {%- endif -%}

        {%- if block.settings.link != blank -%}
          </a>
        {%- endif -%}
      </li>
    {%- endfor -%}
  </ul>
{%- endif -%}



{% schema %}
{
  "name": "Custom image list",
  "class": "index-section",
  "max_blocks": 16,
  "settings": [
    {
      "type": "text",
      "id": "title",
      "label": "Heading",
      "default": "Logo list"
    }
  ],
  "blocks": [
    {
      "type": "logo_image",
      "name": "image",
      "settings": [
        {
          "type": "image_picker",
          "id": "image",
          "label": "Image"
        },
        {
          "type": "url",
          "id": "link",
          "label": "Link",
          "info": "Optional"
        }
      ]
    }
  ],
  "presets": [
    {
      "name": "Custom image list",
      "category": "Image",
      "blocks": [
        {
          "type": "logo_image"
        },
        {
          "type": "logo_image"
        },
        {
          "type": "logo_image"
        },
        {
          "type": "logo_image"
        }
      ]
    }
  ]
}
{% endschema %}

Yes we can add more than 16 blocks in shopify by providing max_blocks . please use this code into your section liquid file you want add these block.

{%- if section.blocks.size > 0 -%}
  <ul class="brand-carousel section-padding ">
    {%- for block in section.blocks -%}
      <li class="item ">
        {%- if block.settings.link != blank -%}
          <a href="{{ block.settings.link }}">
        {%- endif -%}

          {%- if block.settings.image != blank -%}
            {{ block.settings.image | img_url| img_tag: block.settings.image.alt }}
          {%- else -%}
            {{ 'logo' | placeholder_svg_tag: 'placeholder-svg' }}
          {%- endif -%}

        {%- if block.settings.link != blank -%}
          </a>
        {%- endif -%}
      </li>
    {%- endfor -%}
  </ul>
{%- endif -%}



{% schema %}
{
  "name": "Custom image list",
  "class": "index-section",
  "max_blocks": 16,
  "settings": [
    {
      "type": "text",
      "id": "title",
      "label": "Heading",
      "default": "Logo list"
    }
  ],
  "blocks": [
    {
      "type": "logo_image",
      "name": "image",
      "settings": [
        {
          "type": "image_picker",
          "id": "image",
          "label": "Image"
        },
        {
          "type": "url",
          "id": "link",
          "label": "Link",
          "info": "Optional"
        }
      ]
    }
  ],
  "presets": [
    {
      "name": "Custom image list",
      "category": "Image",
      "blocks": [
        {
          "type": "logo_image"
        },
        {
          "type": "logo_image"
        },
        {
          "type": "logo_image"
        },
        {
          "type": "logo_image"
        }
      ]
    }
  ]
}
{% endschema %}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文