Categories

有特色的模板

Shopify. 如何管理列计数在大菜单菜单项

夏洛特·班尼特 June 15, 2016
Rating: 5.0/5. From 2 votes.
Please wait...

在本教程中,我们将向您展示如何管理列数 Megamenu menu items in our Shopify模板.

通常有几列显示在 dropdown 的“产品”菜单选项. 每个列都链接到一个特定的集合.

Shopify_How_to_manage_columns_count_in_the_Megamenu_menu_items_1

中添加一个带有类别的新列 dropdown,请遵循以下步骤:

  1. 登录到您的Shopify管理面板,导航到 Online Store -> Themes section.

    Shopify_How_to_manage_columns_count_in_the_Megamenu_menu_items_2
  2. 在右上角单击三个点,然后选择 Edit HTML/CSS option.

    Shopify_How_to_manage_columns_count_in_the_Megamenu_menu_items_3
  3. Open the settings_schema.json 文件位于 Config 文件夹,并搜索 “Megamenu” code.

  4. 例如,您可以通过编号来识别项目的代码 “megamenu2_sub_col__4”. 复制任何项目的代码,并在最后一个项目代码后输入,将其订单号替换为下一个数字. 在这种情况下,我们需要用5代替4. Save the file.

    Note: 代码在某些模板中可能有所不同.

  5. Return to Online Store -> Themes 节,按 Customize Theme button.

  6. Click the Megamenu tab and check the 产品目录 项目(通常是列表中的第二个).

  7. 为新创建的项和选择一个Collection Save changes

    Shopify_How_to_manage_columns_count_in_the_Megamenu_menu_items_8

现在你需要调整 layout 的下拉列表,它基于 Bootstrap framework.

  1. Open the widget-megamenu.liquid 文件位于 Snippets folder.

    Shopify_How_to_manage_columns_count_in_the_Megamenu_menu_items_9
  2. 定位菜单项的代码. 你可以通过类来识别它 “megamenu_item_2” 其中“2”是这个项目的订单号.

    Shopify_How_to_manage_columns_count_in_the_Megamenu_menu_items_10
  3. Change the code {% for i in (1..4) %} to {% for i in (1..5) %} 为了有5列.

  4. Replace the bootstrap class:

    with:

    Note: 不同模板中的列数不同,因此模板代码可能包含另一个 bootstrap class.

  5. 保存文件并在站点上检查更改 frontend.

我们希望本教程对您有所帮助.

请随时查看下面的详细视频教程:

Shopify. 如何管理列计数在大菜单菜单项
最佳购物主题
这个条目被张贴了出来 Shopify教程 and tagged columns, layout, megamenu, menu, Shopify. Bookmark the permalink.

提交罚单

如果您仍然无法找到关于您的问题的足够的教程,请使用以下链接向我们的技术支持团队提交请求. 我们将在接下来的24小时内为您提供我们的帮助和协助: 提交罚单