10亿+海关交易数据,1.2亿企业数据,2亿+企业联系人数据,1000千万真实采购商。覆盖200+个国家及地区,95%外贸重点拓展市场,可根据行业、经营范围等多方位挖掘目标客户。
免费试用块是构成页面模板中的分区的可自定义模块。您可以使用块来添加文本、图片、链接、按钮等。
Shopify 模板中包含您可以自定义的分区和块。某些分区具有固定的块类型,这意味着只能从模板设计器为该分区提供的块中进行选择。其他分区允许您选择任何块,但会限制您可以添加到该分区的总块数。如果您分区中的块已达到最大可用数量,则会显示一条消息,提示已达到限制,并且在您删除现有块之前,+ 添加块选项将显示为灰色。
PC:
在 Shopify 后台中,转到在线商店 > 模板。
找到您要编辑的模板,然后点击自定义。
在下拉菜单中,选择其中包含您要编辑的分区的模板。
点击分区以将内容加载到预览窗口中,并访问您可用的选项。
点击 + 添加块并选择一个新块,或点击搜索栏以输入搜索词。
点击保存。
苹果系统:
在 Shopify 应用中,轻触商店。
在销售渠道部分,轻触在线商店。
轻触管理模板。
找到您要编辑的模板,然后轻触自定义。
轻触编辑。
在下拉菜单中,选择其中包含您要编辑的分区的模板。
点击分区以将内容加载到预览窗口中,并访问您可用的选项。
点击 + 添加块并选择一个新块,或点击搜索栏以输入搜索词。
点击保存。
安卓系统:
在 Shopify 应用中,轻触商店。
在销售渠道部分,轻触在线商店。
轻触管理模板。
找到您要编辑的模板,然后轻触自定义。
轻触编辑。
在下拉菜单中,选择其中包含您要编辑的分区的模板。
点击分区以将内容加载到预览窗口中,并访问您可用的选项。
点击 + 添加块并选择一个新块,或点击搜索栏以输入搜索词。
点击保存。
元字段可用于在您的在线商店中显示动态信息。如果您有支持元字段的模板,您可以将元字段连接到模板编辑器中的分区或块。
例如,蜡烛卖家可能想显示每种在售蜡烛的燃烧时间。设置用于燃烧时间的元字段后,卖家可以将用于燃烧时间的块添加到他们的产品模板中,然后将该块连接到元字段。为列出燃烧时间的页面设置产品系列元字段后,卖家可以将块添加到他们的产品系列模板中,然后将此块连接到产品系列元字段。
您可以通过添加可使用动态源的分区或块来在您的在线商店中显示动态信息。动态源可用于产品模板中的任何分区或块。在非产品模板中,动态源可用于显示产品的分区或块。您需要先添加元字段,然后才能在模板中连接它。请参阅动态源,了解有关在模板中使用元字段和动态源的更多信息。
完成设置过程后,请按照以下步骤将动态源插入模板:
PC:
在 Shopify 后台中,转到在线商店 > 模板。
找到您要编辑的模板,然后点击自定义。
在下拉菜单中,选择其中包含您要编辑的分区的模板。
点击现有分区以将内容加载到预览窗口中并访问您可用的选项,或点击 + 添加分区。
点击 + 添加块,然后连接动态源:
如果显示连接动态源图标,请点击该图标以选择一个元字段:
如果连接动态源图标显示 +,则点击该符号以选择元字段(最多 20 个),然后一次添加一个元字段:
点击保存。
苹果系统:
在 Shopify 应用中,轻触商店。
在销售渠道部分,轻触在线商店。
轻触管理模板。
找到您要编辑的模板,然后轻触自定义。
轻触编辑。
在下拉菜单中,选择其中包含您要编辑的分区的模板。
点击现有分区以将内容加载到预览窗口中并访问您可用的选项,或点击 + 添加分区。
点击 + 添加块,然后连接动态源:
如果显示连接动态源图标,请点击该图标以选择一个元字段:
如果连接动态源图标显示 +,则点击该符号以选择元字段(最多 20 个),然后一次添加一个元字段:
点击保存。
安卓系统:
在 Shopify 应用中,轻触商店。
在销售渠道部分,轻触在线商店。
轻触管理模板。
找到您要编辑的模板,然后轻触自定义。
轻触编辑。
在下拉菜单中,选择其中包含您要编辑的分区的模板。
点击现有分区以将内容加载到预览窗口中并访问您可用的选项,或点击 + 添加分区。
点击 + 添加块,然后连接动态源:
如果显示连接动态源图标,请点击该图标以选择一个元字段:
如果连接动态源图标显示 +,则点击该符号以选择元字段(最多 20 个),然后一次添加一个元字段:
点击保存。
Shopify商户官网原文详情:
Working with blocks
Blocks are customizable modules that make up the sections in your page templates. You can use blocks to add text, images, links, buttons, and more.
Shopify themes have sections and blocks that you can customize. Some sections have fixed block types, which means that you can only choose from the blocks made available to that section by the theme designer. Other sections allow you to select any block, but limit the total number of blocks that you can add to the section. If your section reaches the maximum number of blocks available, then a message displays the limit reached, and the + Add block option is greyed out until an existing block is removed.
Add a block
PC:
From your Shopify admin, go to Online Store > Themes.
Find the theme that you want to edit, and then click Customize.
From the dropdown menu, select the template that contains the section that you want to edit.
Click a section to load the content into the preview window and access the options available to you.
Click + Add block and select a new block, or click the Search bar to enter a search term.
Click Save.
iPhone:
From the Shopify app, tap Store.
In the Sales channels section, tap Online Store.
Tap Manage themes.
Find the theme that you want to edit, and then tap Customize.
Tap Edit.
From the dropdown menu, select the template that contains the section that you want to edit.
Click a section to load the content into the preview window and access the options available to you.
Click + Add block and select a new block, or click the Search bar to enter a search term.
Click Save.
Android:
From the Shopify app, tap Store.
In the Sales channels section, tap Online Store.
Tap Manage themes.
Find the theme that you want to edit, and then tap Customize.
Tap Edit.
From the dropdown menu, select the template that contains the section that you want to edit.
Click a section to load the content into the preview window and access the options available to you.
Click + Add block and select a new block, or click the Search bar to enter a search term.
Click Save.
Using metafields and dynamic sources
Metafields allow you to display dynamic information on your online store. If you have a theme that supports metafields, then you can connect a metafield to a section or block in the theme editor.
For example, a candle seller might want to display burn times for each type of candle available. After setting up a product metafield for burn time, the seller can add a block for burn time to their product template and then connect it to the product metafield. After setting up a collection metafield for a page that lists burn times, the seller can add a block to their collection template and then connect it to the collection metafield.
You can display dynamic information in your online store by adding sections or blocks that can use dynamic sources. Dynamic sources can be used in any section or block in a product template. In non-product templates, dynamic sources can be used in sections or blocks that show products. You need to add your metafield before you can connect it in your templates. Refer to Dynamic Sources for more information about using metafields and dynamic sources in your theme.
After you complete the setup process, follow these steps to insert the dynamic source into your template:
PC:
From your Shopify admin, go to Online Store > Themes.
Find the theme that you want to edit, and then click Customize.
From the dropdown menu, select the template that contains the section that you want to edit.
Click an existing section to load the content into the preview window and access the options available to you, or click + Add section.
Click + Add block, and then connect a dynamic source:
If the connect dynamic source icon is displayed, then click to select a single metafield:
If the connect dynamic source icon displays a +, then click to select up to 20 metafields by adding them one at a time:
Click Save.
iPhone:
From the Shopify app, tap Store.
In the Sales channels section, tap Online Store.
Tap Manage themes.
Find the theme that you want to edit, and then tap Customize.
Tap Edit.
From the dropdown menu, select the template that contains the section that you want to edit.
Click an existing section to load the content into the preview window and access the options available to you, or click + Add section.
Click + Add block, and then connect a dynamic source:
If the connect dynamic source icon is displayed, then click to select a single metafield:
If the connect dynamic source icon displays a +, then click to select up to 20 metafields by adding them one at a time
Click Save.
Android:
From the Shopify app, tap Store.
In the Sales channels section, tap Online Store.
Tap Manage themes.
Find the theme that you want to edit, and then tap Customize.
Tap Edit.
From the dropdown menu, select the template that contains the section that you want to edit.
Click an existing section to load the content into the preview window and access the options available to you, or click + Add section.
Click + Add block, and then connect a dynamic source:
If the connect dynamic source icon is displayed, then click to select a single metafield:
If the connect dynamic source icon displays a +, then click to select up to 20 metafields by adding them one at a time:
Click Save.
文章内容来源:Shopify商户官方网站
(本文内容根据网络资料整理和来自用户投稿,出于传递更多信息之目的,不代表本站其观点和立场。本站不具备任何原创保护和所有权,也不对其真实性、可靠性承担任何法律责任,特此声明!)
Shopify模板添加块是指在Shopify模板中添加可重用模块的功能,比如添加头部、脚注、侧边栏等模块,从而实现模板内容的复用。
如何在Shopify模板中添加块?在Shopify模板文件中添加如下代码来定义一个名为header的块:
{% block header %} {% endblock %}什么是Shopify模板使用元字段?
Shopify模板中使用{% schema %} {% endschema %} 标签定义模板所需的变量,这些变量被称为元字段,它们可以在Shopify管理后台进行配置,从而实现模板参数化。
如何在Shopify模板中使用元字段?使用{% schema %} 定义元字段名称和类型,然后使用Liquid变量语法{{ }}输出元字段值,例如:
{% schema %} { \"name\": \"Header Text\", \"type\": \"string\" } {% endschema %}什么是Shopify模板使用动态源?{{ header_text }}
Shopify模板支持使用liquid动态导入其他文件作为子模板,这种导入方式称为使用动态源。比如导入顶级分类作为侧边栏。
如何在Shopify模板中使用动态源?使用{% render %}标签导入其他liquid文件作为子模板内容,例如:
{% render 'sidebar' %}