Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hello,
I am having troubles to display a full width dropdown menu on the storefront and I am trying to troubleshoot what is going on. Could you help me?
From what I can understand, this code checks the settings and it should apply a class to display the menu in full width in case the page is renderer in desktop
in nav-item.liquid file ->
(...)
{%- liquid
assign fullwidthMenu = false
if link.levels > 1 and link.links.size > 4 or menuDropdown != ''
assign fullwidthMenu = true
elsif menuDropdown != ''
assign fullwidthMenu = true
endif
-%}
(...)
<li class="nav-item {% if dropDown or menuDropdown != '' %}dropdown-menu-list {% endif %}{% if fullwidthMenu %}nav-item-mega-menu {% endif %}{% if link.current %}active{% endif %}">
(...)
Now, it seems like fullwidthMenu variable is false, probably because link.levels < 1 or link.links.size < 4 or menuDropdown = '' , I tried to capture this values to see where is the problem, but I don't know how to look for them or where do they come from.
Do you know where can I see the settings from where this is information or these settings are taken?
Thank you!!!
Solved! Go to the solution
This is an accepted solution.
Replying to myself as I found what was wrong -> I hadn't added the block under the header in the Header Group -> theme editor
Leaving it here just in case help someone
This is an accepted solution.
Replying to myself as I found what was wrong -> I hadn't added the block under the header in the Header Group -> theme editor
Leaving it here just in case help someone
As 2024 wraps up, the dropshipping landscape is already shifting towards 2025's trends....
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024