分区和块

模板使用分区来创建所需的布局。大多数分区由组成,块用于提供特定功能,例如标头、文本、单张图片、拼贴图片或链接。在模板中使用分区和块可为排列商店内容提供更大的灵活性,使您无需编辑代码即可控制在线商店的外观。

您可以向每个分区添加多种特定的块。您的模板决定哪些分区和块可用。有关哪些选项可供您使用的详细信息,请参阅您的模板文档。

某些分区对可添加的块数量或特定类型的块的数量有限制。例如,带文本图片分区只能显示模板设计器为模板指定的块。在 Shopify 的免费模板 Dawn 中,您只能添加以下块中的一个块:

  • 标题

  • 段落

  • 按钮

您可以通过编辑分区的设置来进一步自定义分区,包括添加图片和选择对齐方式、大小、背景色以及客户访问您在线商店时首先加载的内容。

如果您添加到商店布局的分区不包含您所需的设置或选项,您可以编辑模板代码或联系模板的开发人员寻求支持。

使用分区和块来自定义模板样式

打开编辑器时,系统会默认加载您商店的主页。您可以使用下拉菜单选择其他模板,或使用模板下拉菜单中的搜索栏来搜索特定页面类型。选中某个模板会将其加载到模板编辑器中,并且您所做的更改会随着您的操作在编辑器中显示预览。

Shopify商户官网原文详情:

Sections and blocks

Themes use sections to create your ideal layout. Most sections are made up of blocks that serve a specific function, such as headers, text, single images, a collage of images, or links. Using sections and blocks in your templates provides more flexibility in how you arrange your store's content, enabling you to control the look and feel of your online store without the need to edit code.

Each section has a specific variety of blocks that you can add to it. Which sections and blocks are available depends on your theme. For more information about what options are available to you, refer to your theme documentation.

Some sections have limits on the number of blocks that you can add, or limits on the number of blocks of a certain type. For example, the Image with text section can only display the blocks specified by the theme designer for your theme. In Dawn, the free Shopify theme, you can add only one of each of the following blocks:

  • a heading

  • a paragraph

  • a button

You can further customize the section by editing its Settings to include an image and choose the alignment, size, background color, and what loads first when customers visit your online store.

If the sections that you add to your store layout don't include the settings or options that you need, then you can edit your theme code or contact your theme's developer for support.

Customize your theme templates with sections and blocks

When you open the theme editor, your store's home page loads by default. You can use the dropdown menu to select a different template, or use the search bar in the template dropdown to search for a specific page type. Selecting a template loads it into the theme editor, and any changes you make are previewed in the editor as you make them.

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


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