shopify在线商店自定义模板操作介绍

2024-01-01 14:01:26
By 戒色

分区和块

在分区和块列表中,默认情况下显示页面上分区的所有块。

默认情况下,组成标头或页脚的分区会折叠,但如果您点击分区名称旁边的展开图标 ?,便可以看到这些分区。

删除分区

您可以在每个商品的设置屏幕中删除模板中的分区或块。删除分区按钮显示在分区设置的底部。

步骤:

  1. 在模板编辑器侧边栏中,点击要删除的分区或块。

  2. 点击删除分区删除块

  3. 点击保存。如果您要编辑已发布的模板,请点击发布以保存更改并将其保存在您的商店中。

隐藏块

您可以使用眼睛图标隐藏任何分区或块。

模板

您可以在模板编辑器顶栏的页面选择器中访问所有模板。

如果您使用的是“Online Store 2.0” 模板,则还可以通过点击新建模板选项来直接从页面选择器中创建新模板。

通过应用于特定资源来预览模板效果

查看模板时,您可以将其应用于商店中的任何兼容资源来预览其显示效果。例如,如果您查看产品模板,则可以使用商店的任何产品来测试它。

步骤:

  1. 在模板编辑器页面选择器中,选择您要预览的模板。

  2. 在导航面板的预览分区中,点击更改

  3. 选择菜单中,选择您要预览的资源。

撤消和恢复操作

撤销恢复按钮位于模板编辑器的右上方。

查看文档、获取支持并检查您的模板版本

指向模板文档和支持信息的链接已移动到菜单栏中的更多 ? 菜单。在此菜单中,您还可以查看模板版本和创建者信息。

提示 如果使用来自 Shopify 的免费模板,那么您可以通过参阅来自 Shopify 的免费模板以及点击模板的名称来查看此模板的分区和设置的详细信息。

若要了解付费模板的分区和设置,请参阅模板文档。

获取有关自定义项的帮助

如需更改模板方面的帮助,则可以联系您的模板开发人员寻求支持。

要查看可用于帮助您进行模板自定义的其他资源,请参阅模板支持的其他资源

Shopify商户官网原文详情:

Sections and blocks

In the list of sections and blocks, all of the blocks for the sections on a page are shown by default.

Sections that make up the header or footer are collapsed by default, but you can view them if you click the expand icon ? next to the section name.

Removing sections

You can delete a section or block from a template from the setting screen for each item. The Remove section button appears at the bottom of the section settings.

Steps:

  1. In the theme editor sidebar, click the section or block that you want to remove.

  2. Click Remove section or Remove block.

  3. Click Save. If you're editing a published theme, then click Publish to save your changes and make them live in your store.

Hiding blocks

You can hide any section or block using the eye icon.

Templates

You can access all of your theme's templates from the page selector in the top bar of the theme editor.

If you're using an Online Store 2.0 theme, then you can also create a new template directly from the page selector by clicking the New template option.

Previewing templates with specific resources

When you're viewing a template, you can preview how it looks with any compatible resource in your store. For example, if you're viewing a product template, then you can test it with any product in your store.

Steps:

  1. From the theme editor page selector, select the template that you want to preview.

  2. From the navigation panel, in the Preview section, click Change.

  3. From the Select menu, select the resource you want to preview.

Undoing and redoing actions

The Undo and Redo buttons are located at the top right of the theme editor.

Viewing documentation, getting support, and checking your theme version

Links to your theme's documentation and support information can be found in the More ? menu in the menu bar. In this menu, you can also check the theme version and creator information.

Get help with customizations

If you need help with making changes to your theme, then you can contact your theme's developer for support.

To see what other resources are available to help you with theme customizations, see Additional resources for theme support.

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



(本文内容根据网络资料整理和来自用户投稿,出于传递更多信息之目的,不代表本站其观点和立场。本站不具备任何原创保护和所有权,也不对其真实性、可靠性承担任何法律责任,特此声明!)


常见问答(FQAS)


问题一:Shopify模板文件怎么编辑?

你可以通过后台管理界面登录后,选择“运营”->“模板”菜单,进入模板管理页面。这里可以查看、下载、上传、编辑各种 liquid 模板文件。强烈推荐使用文本编辑器如Sublime Text或VS Code来打开和编辑模板文件。

问题二:如何删除Shopify页面或模块?

登录管理后台,点击\"运营->页面\",进入页面管理页面。选择需要删除的页面,点击删除按钮。或者进入对应的模块管理界面,如商品模块、博客模块等,选择需要删除的模块按照相同步骤进行删除。

问题三:如何在Shopify模板中循环输出商品?

使用Liquid语法中的for循环语句可以实现商品列表的输出。比如:{% for product in collections.all.products %} 将会循环输出店铺中的所有商品。你还可以添加条件过滤等更丰富的输出效果。

问题四:怎么在Shopify模板中添加JS和CSS文件?

要在Shopify模板中添加js和css文件,需要将其上传到assets目录中。然后在模板html文件相应位置使用{{ 'file.js' | asset_url }}和{{ 'file.css' | asset_url }}标签来引入。注意asset文件需要放在具体的子目录中,如js/或css/下。