Solved

How can I maintain clickable links while using a mega menu in Dawn theme?

castlefurniture
Excursionist
15 0 3

Is there a way to retain the functionality of the menu link being an active clickable link while also being used as a mega menu? I'm using code to make the mega menu appear on hover.

This website shows how I'd like the navigation to function, they have the mega menu on hover and the category link remains clickable
https://www.blossomus.com/

 

Here is the link to my shopify store

https://2bb416.myshopify.com/

 

 

Accepted Solution (1)

DaviesYoung
Shopify Partner
11 4 6

This is an accepted solution.

If I understand correctly you could try to add a link to the menu-items with a subnav.
- Snippets > header-mega-menu.liquid (l.19-25)

 

{%- assign parentlink = link.links[0] -%}
<a href="{{ parentlink.url }}" title="{{ parentlink.title }}">
  <span
    {%- if link.child_active %}
      class="header__active-menu-item"
    {% endif %}
  >
    {{- link.title | escape -}}
  </span>
</a>

 

My two cents. Good luck!

Davies&Young - We Design, Budget-Friendly, Shopify Stores [Richie]

Get a Head Start; Shopify Layout Builder - Turbocharge your Storefront's Setup.
Perfect Finish; Shopify Theme Designer - Not satisfied? Enjoy our money-back guarantee.

View solution in original post

Replies 2 (2)

DaviesYoung
Shopify Partner
11 4 6

This is an accepted solution.

If I understand correctly you could try to add a link to the menu-items with a subnav.
- Snippets > header-mega-menu.liquid (l.19-25)

 

{%- assign parentlink = link.links[0] -%}
<a href="{{ parentlink.url }}" title="{{ parentlink.title }}">
  <span
    {%- if link.child_active %}
      class="header__active-menu-item"
    {% endif %}
  >
    {{- link.title | escape -}}
  </span>
</a>

 

My two cents. Good luck!

Davies&Young - We Design, Budget-Friendly, Shopify Stores [Richie]

Get a Head Start; Shopify Layout Builder - Turbocharge your Storefront's Setup.
Perfect Finish; Shopify Theme Designer - Not satisfied? Enjoy our money-back guarantee.
castlefurniture
Excursionist
15 0 3

Thank you this works!