Matthias Keil
Matthias Keil

Reputation: 1

Add different menus for different pages on shopify

I want different Menus on different Pages in my Shopify Store but my code doesn't work. If i use my code it shows me no menu also the mainmenu is not visible.

I created a Page and a Page Template

I code this at the top of the file header-drawer.liquid after comment

{% if page.handle contains == "PageTemplateName" %}
{% assign _new_menu = linklists.HandleMenuName.links %}  
  {% else %}
{% assign _new_menu = section.settings.menu.links %}  
{% endif %}>

And i replace on line 10 {%- for link in section.settings.menu.links -%} with {%- for link in section._new_menu -%}

After that i repeat the steps with header-dropdown-menu.liquid and header-mega-menu.liquid

Upvotes: 0

Views: 15

Answers (0)

Related Questions