Shopify themes, liquid, logos, and UX
I am trying to change a menu based on page tags on the Refresh Theme.
I am working in the Header.liquid and after trying three different ways I figured I am stuck so I will pose the question here.
Site: https://goldmedalwine.myshopify.com/
Password:3m3rt%3
Here is code change trying to just force all to one menu before I rewrap it in a if{% assign menu = 'wsmenu' %}
{% assign section.settings.menu= 'wsmenu'%}
Menu: {{ section.settings.menu }}
{% assign menu_handle = 'wsmenu' %}
This is just above the Nav div and I have tried it below and when it displays it is always the main menu
Here is the code from the header at line 395
{%- if section.settings.menu != blank -%}
{%- if section.settings.menu_type_desktop == 'dropdown' -%}
<nav class="header__inline-menu">
<ul class="list-menu list-menu--inline" role="list">
{%- for link in section.settings.menu.links -%}
<li>
{%- if link.links != blank -%}
<header-menu>
So all in all any help or directions would be awesome
Solved! Go to the solution
This is an accepted solution.
Again thank you.
It was your snide message that allowed me to see the issue.
I needed to set the menu item to the proper section
assign menu_item = section.settings.menu
Then my if then , then assign the linked list.
assign menu_item = linklists.wsmenu
Thank the creator for docuentation
You're doing the wrong thing by customising section.settings.xxx!
Because the content of section.settings.xxx is defined primarily through the backend, not by you assigning values to it in code!
Thank you for your most supportive and informative missive.
This is an accepted solution.
Again thank you.
It was your snide message that allowed me to see the issue.
I needed to set the menu item to the proper section
assign menu_item = section.settings.menu
Then my if then , then assign the linked list.
assign menu_item = linklists.wsmenu
Thank the creator for docuentation
Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025Expand into selling wholesale with Shopify Academy’s learning path, B2B on Shopify: Lau...
By Shopify Jan 28, 2025