模板架构版本

2021 年 7 月,Shopify 发布了名为“ Online Store 2.0”的新模板架构。使用之前架构的模板称为复古模板。复古模板包含两种类型:分区模板和未分区模板。模板架构版本决定了构成模板的文件类型、模板自定义方式以及应用与模板的集成方式。您的模板架构版本还可能为您提供新 Shopify 功能的访问权限。

Shopify 提供一些免费的 Online Store 2.0 模板,每个都采用不同的外观设计。详细了解 OS2.0 模板,或浏览模板商店 以查找与 Online Store 2.0 兼容的模板。

您的模板架构版本还决定了您对 Shopify 新功能的使用权限,这些功能仅在 Online Store 2.0 模板中发布。


“Online Store 2.0”功能与复古模板功能

特征复古OS 2.0
主页上的分区
自定义在线商店主页上的内容。添加、重新排列或删除分区以创建页面布局。
每个页面上的分区
自定义在线商店大多数页面上的内容。添加、重新排列或删除分区和块,以创建独特的页面布局。
-
增强的应用支持
安装或更改应用,而无需修改任何代码。使用应用块可在模板中的任意位置添加应用功能。
-
使用动态源使内容更丰富
通过将设置连接到动态源,向您模板的任何设置中添加动态的专门化信息。动态源可以是资源属性或元字段值。
-
产品系列筛选
允许客户按是否有货、价格等条件筛选商店中的产品系列。
-



确定您的模板架构版本

对于以下情况,您可能需要知道您的模板使用的是何种模板架构版本:

  • 您要尝试确定应用或应用功能是否与您的模板兼容

  • 您想使用仅适用于 Online Store 2.0 模板的功能之一

  • 您想了解某一自定义教程是否适用于您的模板

模板架构版本与模板库中的每种模板具有相对应的关系。您可能同时拥有“Online Store 2.0”模板和复古模板。

步骤:

PC:

  1. 在 Shopify 后台中,转到在线商店 > 模板

  2. 找到您要编辑的模板,然后点击自定义

  3. 打开页面顶部的下拉菜单。

  1. 选择产品 > 默认产品。这将打开默认产品模板。

  2. 查看产品模板分区下方的侧边栏。如果您有“Online Store 2.0”模板,分区列表下方便会显示添加分区按钮。

  3. 如果未显示添加分区按钮,则您可能拥有复古分区模板或复古未分区模板。若要了解您的模板使用的是何种版本的复古架构,请按照确定复古模板架构版本中的步骤进行操作。

苹果系统:

  1. 在 Shopify 应用中,轻触商店

  2. 销售渠道部分,轻触在线商店

  3. 轻触管理模板

  4. 找到您要编辑的模板,然后轻触自定义

  5. 轻触模板

  1. 选择产品 > 默认产品。这将打开默认产品模板。

  2. 查看产品模板分区下方的侧边栏。如果您有“Online Store 2.0”模板,分区列表下方便会显示添加分区按钮。

  3. 如果未显示添加分区按钮,则您可能拥有复古分区模板或复古未分区模板。若要了解您的模板使用的是何种版本的复古架构,请按照确定复古模板架构版本中的步骤进行操作。

安卓系统:

  1. 在 Shopify 应用中,轻触商店

  2. 销售渠道部分,轻触在线商店

  3. 轻触管理模板

  4. 找到您要编辑的模板,然后轻触自定义

  5. 轻触模板

  1. 选择产品 > 默认产品。这将打开默认产品模板。

  2. 查看产品模板分区下方的侧边栏。如果您有“Online Store 2.0”模板,分区列表下方便会显示添加分区按钮。

  3. 如果未显示添加分区按钮,则您可能拥有复古分区模板或复古未分区模板。若要了解您的模板使用的是何种版本的复古架构,请按照确定复古模板架构版本中的步骤进行操作。

备注

在较少情况下,有可能您模板的某些区域支持 Online Store 2.0 功能,而其他区域则不支持。例如,您的产品页面可能支持添加和删除分区,而产品系列页面则可能不支持。这是因为 Online Store 2.0 功能需要 JSON 模板才能正常运行。如果您只是部分地将模板迁移到 Online Store 2.0,或者您的模板不是来自 Shopify 模板商店,并且模板开发人员未在所有页面中加入 JSON 模板,那么您可能就没有适用于所有页面的 JSON 模板。

确定复古模板架构版本

在知道您使用的是复古模板后,您还应该了解您使用的是分区还是未分区模板。这将帮助您了解适用于模板的自定义,以及在任何模板自定义教程中要遵循的系列步骤。

在模板编辑器中检查模板版本的一种方式是检查您是否可以通过拖放来安排主页的布局。如果可以拖放元素,则表示您使用的是分区模板。

为确定您使用的是哪个版本,请查看您的模板代码中的 Sections 文件夹。

步骤:

PC:

  1. 在 Shopify 后台中,转到在线商店 > 模板

  2. 找到要编辑的模板,然后点击操作 > 编辑代码

  1. 查看侧边栏中的文件夹结构:

    • 如果 Sections 目录中有文件,则表示您使用的是分区模板。

    • 如果 Sections 目录中没有任何文件,则表示您使用的是未分区模板。

苹果系统:

  1. 在 Shopify 应用中,轻触商店

  2. 销售渠道部分中,轻触在线商店

  3. 轻触 Manage themes(管理模板)。

  4. 找到要编辑的模板,然后点击操作 > 编辑代码

  1. 查看侧边栏中的文件夹结构:

    • 如果 Sections 目录中有文件,则表示您使用的是分区模板。

    • 如果 Sections 目录中没有任何文件,则表示您使用的是未分区模板。

安卓系统:

  1. 在 Shopify 应用中,轻触商店

  2. 销售渠道部分中,轻触在线商店

  3. 轻触 Manage themes(管理模板)。

  4. 找到要编辑的模板,然后点击操作 > 编辑代码

  1. 查看侧边栏中的文件夹结构:

    • 如果 Sections 目录中有文件,则表示您使用的是分区模板。

    • 如果 Sections 目录中没有任何文件,则表示您使用的是未分区模板。

模板版本

所有模板都有版本号,可在模板库中进行查看。若要了解模板版本之间的差异,请查看模板更新的发行说明。


Shopify商户官网原文详情:

Theme architecture versions

In July 2021, Shopify released a new theme architecture called Online Store 2.0. Themes that use the previous architecture are called vintage themes. Vintage themes have two types: sectioned and non-sectioned. Your theme architecture version determines the file types that make up your theme, the ways that you can customize your theme, and the ways that apps can integrate with your theme. Your theme architecture version might also give you access to new Shopify features.

Shopify offers several free Online Store 2.0 themes, each designed with a different look and feel. Learn more about OS2.0 themes, or browse the theme store to find themes that are compatible with Online Store 2.0.

Your theme architecture version also determines your access to new Shopify features, which are released only on Online Store 2.0 themes.


Online Store 2.0 features vs. vintage theme features

FeatureVintageOS 2.0
Sections on the home page
Customize the content on your online store's home page. Add, rearrange, or remove sections to create your page layout.
Sections on every page
Customize the content on most of your online store's pages. Add, rearrange, or remove sections and blocks to create unique page layouts.
-
Enhanced app support
Install or change apps without touching any code. Add app functionality anywhere in your theme using app blocks.
-
Richer content using dynamic sources
Add dynamic, specialized information to any setting in your theme by connecting the setting to a dynamic source. A dynamic source can be a resource attribute or a metafield value.
-
Collection filtering
Allow customers to filter collections in your store by availability, price, and more.
-

Determine your theme architecture version

You might want to know which theme architecture version your theme is using in the following cases:

  • you're trying to determine whether an app or app feature is compatible with your theme

  • you want to use one of the features only available to Online Store 2.0 themes

  • you want to know whether a certain customization tutorial applies to your theme

The theme architecture version is specific to each theme in your theme library. You might have both Online Store 2.0 themes and vintage themes in your theme library at the same time.

Steps:

PC:

  1. From your Shopify admin, go to Online Store > Themes.

  2. Find the theme that you want to edit, and then click Customize.

  3. Open the drop-down menu at the top of the page.

  1. Select Products > Default product. This opens the default product template.

  2. Look in the sidebar, below the product template sections. If you have an Online Store 2.0 theme, then an Add section button appears below the section list.

  3. If no Add section button appears, then you might have a vintage sectioned theme or a vintage non-sectioned theme. Follow the steps in Determine your vintage theme architecture version to learn which vintage architecture version your theme is using.

iPhone:

  1. From the Shopify app, tap Store.

  2. In the Sales channels section, tap Online Store.

  3. Tap Manage themes.

  4. Find the theme that you want to edit, and then tap Customize.

  5. Tap Templates.

  1. Select Products > Default product. This opens the default product template.

  2. Look in the sidebar, below the product template sections. If you have an Online Store 2.0 theme, then an Add section button appears below the section list.

  3. If no Add section button appears, then you might have a vintage sectioned theme or a vintage non-sectioned theme. Follow the steps in Determine your vintage theme architecture version to learn which vintage architecture version your theme is using.

Android:

  1. From the Shopify app, tap Store.

  2. In the Sales channels section, tap Online Store.

  3. Tap Manage themes.

  4. Find the theme that you want to edit, and then tap Customize.

  5. Tap Templates.

  1. Select Products > Default product. This opens the default product template.

  2. Look in the sidebar, below the product template sections. If you have an Online Store 2.0 theme, then an Add section button appears below the section list.

  3. If no Add section button appears, then you might have a vintage sectioned theme or a vintage non-sectioned theme. Follow the steps in Determine your vintage theme architecture version to learn which vintage architecture version your theme is using.

Determine your vintage theme architecture version

After you know you're using a vintage theme, you should also learn whether you're using a sectioned or a non-sectioned theme. This helps you understand which customizations are available for your theme, and which set of steps to follow within any theme customization tutorials.

A way to check in the theme editor is to check if you can drag and drop to arrange the layout of your home page. If you can drag and drop elements, then you have a sectioned theme.

To make sure which version you are using, check the Sections folder within your theme code.

Steps:

PC:

  1. From your Shopify admin, go to Online Store > Themes.

  2. Find the theme you want to edit, and then click Actions > Edit code.

  1. Check the folder structure in the sidebar:

    • If there are files in the Sections directory, then you're using a sectioned theme.

    • If there aren't any files in the Sections directory, then you're using a non-sectioned theme.

iPhone:

  1. From the Shopify app, tap Store.

  2. In the Sales channels section, tap Online Store.

  3. Tap Manage themes.

  4. Find the theme you want to edit, and then click Actions > Edit code.

  1. Check the folder structure in the sidebar:

    • If there are files in the Sections directory, then you're using a sectioned theme.

    • If there aren't any files in the Sections directory, then you're using a non-sectioned theme.

    Android:

  1. From the Shopify app, tap Store.

  2. In the Sales channels section, tap Online Store.

  3. Tap Manage themes.

  4. Find the theme you want to edit, and then click Actions > Edit code.

  1. Check the folder structure in the sidebar:

    • If there are files in the Sections directory, then you're using a sectioned theme.

    • If there aren't any files in the Sections directory, then you're using a non-sectioned theme.

Theme versions

All themes have a version number, which can be seen in your Theme Library. To learn about the differences of theme versions, review the release notes of a theme update.

文章内容来源:Shopify商户官方网站


(本文内容根据网络资料整理,出于传递更多信息之目的,不代表连连国际赞同其观点和立场)