Shopify themes, liquid, logos, and UX
I have build a store using dawn theme.
But the problem is when I click the main navigation, the dropdown appears, which Is okay but it's link is disabled.
The link on that anchor doesn't work. I'm talking about the main navigation. 1st child and grandchild links are working fine, but if there is a dropdown level, the parent link doesn't work.
Any way to fix this???
Solved! Go to the solution
This is an accepted solution.
Please find following code your sections/header.liquid file
<summary class="header__menu-item list-menu__item link">
<span {%- if link.child_active %} class="header__active-menu-item"{% endif %}>{{ link.title | escape }}</span>
{% render 'icon-caret' %}
</summary>
Replace to
<summary class="header__menu-item list-menu__item link">
<span {%- if link.child_active %} class="header__active-menu-item"{% endif %}><a href="{{ link.url }}"
class="header__menu-item header__menu-item ">{{ link.title | escape }}</a></span>
{% render 'icon-caret' %}
</summary>
Thanks!
Please share store URL.
Thanks!
Please share store front password.
Thanks!
i have check your shop and all link working correctly . please share screenshot which link not working
Thanks!
check following screenshot
The main parent navigation doesn't work if hey have Child under it.
They open the modal but anchor is disabled. Also, I want the link to open when the user hovers, not when clicked
i have set navigation from backend!
just go to the liquid code, it says summary and only {{child.title}}
no anchor,
This code customization work
This is an accepted solution.
Please find following code your sections/header.liquid file
<summary class="header__menu-item list-menu__item link">
<span {%- if link.child_active %} class="header__active-menu-item"{% endif %}>{{ link.title | escape }}</span>
{% render 'icon-caret' %}
</summary>
Replace to
<summary class="header__menu-item list-menu__item link">
<span {%- if link.child_active %} class="header__active-menu-item"{% endif %}><a href="{{ link.url }}"
class="header__menu-item header__menu-item ">{{ link.title | escape }}</a></span>
{% render 'icon-caret' %}
</summary>
Thanks!
I did this too, but this will not work. as on click drop down also opens and it will have link too, so for dropdown, if i click, then it will navigate to the url but the dropdown will not work.
ok i will check your problem but click on arrow drop down open
if add css or code any file please remove it
Thanks!
hey i have done it. check the website now, link is also added and on hover the menu opens instead of clicking, and the url is also working now!
check, i will share the code too. i have removed the <summary> element, and converted it into <div>
ok, Great!
Dear @DM Thanks for the solution! It works on desktop now, yet on mobile, if clicking on the parent collection, still the sub-collections appear and it is not possible to click on the parent collection and see all products at once/ main collection as on desktop. Any solutions? THANK YOU!
hi,
this is working but the color and font size changed. how to solve that
@TanjaSalty please share the link so that i can further investigate.
Also, please make sure you're doing this work in DAWN theme at line#305
because same code is available at line#95 but it's for mobile menu.
May be that's the reason your code is not working.
@qaiser1 send me the link, i'll check and let you know.
User | RANK |
---|---|
171 | |
151 | |
71 | |
46 | |
34 |
Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023One of the key components to running a successful online business is having clear and co...
By Ollie Mar 6, 2023