Categories

有特色的模板

Shopify. 如何在大菜单中添加项目(基于58030+模板)

Alice Weasley March 3, 2017
Rating: 5.0/5. From 1 vote.
Please wait...

通常,超级菜单包含6个菜单项. 若要再添加一项,请执行以下更改.

Shopify._How_to_add_item_to_megamenu_ (based_on_58030 + _templates) _1
  1. 打开站点管理面板并导航到 Online Store > Themes > Edit HTML/CSS.

    Shopify._How_to_add_item_to_megamenu_ (based_on_58030 + _templates) _2
  2. Open settings_schema.json 文件位于 Config 文件夹并保存其副本.

    在最后一个大菜单项目代码之后添加此代码, 大概在1700行左右, 在结束前的菜单部分. 由于item 6不再是列表中的最后一项,我们需要在新代码之前添加一个逗号.

    	  
    	  ,
          { 
    "type": "header", 
    “内容”:“第7项” 
    }, 
    { 
    "type": "text", 
    "id": "mm7_name", 
    “label”:“物品名称”; 
    "info": "清除此字段以禁用项目#1" 
    }, 
    { 
    "type": "text", 
    "id": "mm7_link", 
    "label": "项目URL" 
    }, 
    { 
    "type": "text", 
    “id”:“mm7_badge”, 
    "label": "项目标识" 
    }, 
    { 
    “类型”:“段”, 
    “内容 ": "———————————————————" 
    }, 
    { 
    “类型”:“复选框”, 
    “id”:“mm7_sub_toggle”, 
    “标签”:“子菜单” 
    }, 
    { 
    "type": "radio", 
    “id”:“mm7_sub_content”, 
    "options": [ 
    { 
    “价值”:“links_1”, 
    "label": "1. 单菜单(链接列表)” 
    }, 
    { 
    “价值”:“links_4”, 
    "label": "2. 菜单块(链接列表)" 
    }, 
    { 
    “价值”:“产品”, 
    "label": "3. 产品(集合)” 
    }, 
    { 
    "value": "blog", 
    "label": "4. Blog" 
    } 
    ] 
    }, 
    { 
    “类型”:“link_list”, 
    “id”:“mm7_sub_links_1”, 
    "label": "1. 选择单个菜单(链接列表)" 
    }, 
    { 
    “类型”:“link_list”, 
    “id”:“mm7_sub_links_4_1”, 
    "label": "2. 选择菜单块(链接列表)" 
    }, 
    { 
    "type": "image", 
    “id”:“img_list7_img_1.jpg", 
    "label": "图像文件"; 
    "max-width": 255, 
    “max-height”:167年, 
    "info": "幻灯片图片最大尺寸为255x167px" 
    }, 
    { 
    “类型”:“link_list”, 
    “id”:“mm7_sub_links_4_2” 
    }, 
    { 
    "type": "image", 
    “id”:“img_list7_img_2.jpg", 
    "label": "图像文件"; 
    "max-width": 255, 
    “max-height”:167年, 
    "info": "幻灯片图片最大尺寸为255x167px" 
    }, 
    { 
    “类型”:“link_list”, 
    “id”:“mm7_sub_links_4_3” 
    }, 
    { 
    "type": "image", 
    “id”:“img_list7_img_3.jpg", 
    "label": "图像文件"; 
    "max-width": 255, 
    “max-height”:167年, 
    "info": "幻灯片图片最大尺寸为255x167px" 
    }, 
    { 
    “类型”:“link_list”, 
    “id”:“mm7_sub_links_4_4” 
    }, 
    { 
    "type": "image", 
    “id”:“img_list7_img_4.jpg", 
    "label": "图像文件"; 
    "max-width": 255, 
    “max-height”:167年, 
    "info": "幻灯片图片最大尺寸为255x167px" 
    }, 
    { 
    “类型”:“集合”, 
    “id”:“mm7_sub_products”, 
    "label": "3. 选择产品(收藏)” 
    }, 
    { 
    "type": "blog", 
    “id”:“mm7_sub_blog”, 
    "label": "4. Choose blog" 
    }
    
    Shopify._How_to_add_item_to_megamenu_ (based_on_58030 + _templates) _3
  3. Save the changes.

  4. In the Snippets > widget-megamenu.liquid 在第10行左右的代码中将文件更改6到7:

    {% for i in (1..6) %} 
  5. Save the changes.

    Shopify._How_to_add_item_to_megamenu_ (based_on_58030 + _templates) _5
  6. In the Locales > en.default.json 在第26行周围添加新菜单项的代码:

  7. Save the changes.

    Shopify._How_to_add_item_to_megamenu_ (based_on_58030 + _templates) _6
  8. Save 更改并刷新站点.

    Shopify._How_to_add_item_to_megamenu_ (based_on_58030 + _templates) _7

看一看精选的顶级产品 Shopify themes.

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

Shopify. 如何在大菜单中添加项目(基于58030+模板)
最佳购物主题
这个条目被张贴了出来 Shopify教程 and tagged item, megamenu, menu, menu item, Shopify. Bookmark the permalink.

Submit a ticket

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