How do I make the navigation menu clickable?

Solved

How do I make the navigation menu clickable?

LDLC_Shop
Tourist
14 0 8

As DEMONSTRATED on the PICTURE, I want that the SHOP button to have two functions, one of them redirecting the user to the ALL PRODUCTS/AKA DESTINATION PAGE that it is set to, as well as by hover opening up the sub mega menu. How can I do that?

 

LDLC_Shop_0-1739371567905.png

 

Accepted Solution (1)

CodingFifty
Shopify Partner
903 136 164

This is an accepted solution.

Hi @LDLC_Shop,

 

Step 1: Replace code in header-dropdown-menu.liquid

Find the following code:

 

 

<span
                  {%- if link.child_active %}
                    class="header__active-menu-item"
                  {% endif %}
                >
                  {{- link.title | escape -}}
                </span>

 

Replace it with the following code

 

      <a
                  id="HeaderMenu-{{ link.handle }}"
                  class="list-menu__item link--text focus-inset"
                  href="{{ link.url }}" style="text-decoration:none;"
                >
                  <span
                    {%- if link.child_active %}
                      class="header__active-menu-item"
                    {% endif %}
                  >
                    {{- link.title | escape -}}
                  </span>
                </a>

 

Step 2: Replace code in header-dropdown-menu.liquid

Find the following code:

 

<span>{{ childlink.title | escape }}</span>

 

And replace it with following code

 

 

<a
                            id="HeaderMenu-{{ link.handle }}"
                            class="list-menu__item link--text focus-inset"
                            href="{{ childlink.url }}"
                            style="text-decoration:none;"
                          >
                            <span>{{ childlink.title | escape }}</span>
                          </a>

 



Coding Fifty || Shopify Partner
For any custom section queries, please visit: Fiverr Profile
Found my response useful? Like it and mark as Accepted Solution!
For additional discussions, reach out via: Email ID: codingfifty@gmail.com

View solution in original post

Reply 1 (1)

CodingFifty
Shopify Partner
903 136 164

This is an accepted solution.

Hi @LDLC_Shop,

 

Step 1: Replace code in header-dropdown-menu.liquid

Find the following code:

 

 

<span
                  {%- if link.child_active %}
                    class="header__active-menu-item"
                  {% endif %}
                >
                  {{- link.title | escape -}}
                </span>

 

Replace it with the following code

 

      <a
                  id="HeaderMenu-{{ link.handle }}"
                  class="list-menu__item link--text focus-inset"
                  href="{{ link.url }}" style="text-decoration:none;"
                >
                  <span
                    {%- if link.child_active %}
                      class="header__active-menu-item"
                    {% endif %}
                  >
                    {{- link.title | escape -}}
                  </span>
                </a>

 

Step 2: Replace code in header-dropdown-menu.liquid

Find the following code:

 

<span>{{ childlink.title | escape }}</span>

 

And replace it with following code

 

 

<a
                            id="HeaderMenu-{{ link.handle }}"
                            class="list-menu__item link--text focus-inset"
                            href="{{ childlink.url }}"
                            style="text-decoration:none;"
                          >
                            <span>{{ childlink.title | escape }}</span>
                          </a>

 



Coding Fifty || Shopify Partner
For any custom section queries, please visit: Fiverr Profile
Found my response useful? Like it and mark as Accepted Solution!
For additional discussions, reach out via: Email ID: codingfifty@gmail.com