Support Offline : Mon - Fri / 10am - 6pm (GMT +6)

Your Time: Our Time:

Menu Item type "Menu Heading" / "Text Separator" are shown as links on desktop

Featured Lock Resolved Bug
Hi there, I would like to mention a bug (maybe it's not)... So if you set in your menu options a new menu item with the menu-type "Menu Heading" or "Text Separator", it wraps the menu item in a <a> link to home on bigger displays. On mobile, the menu item is without an <a>-wrap.

Could you please tell me where to change this and get rid of the a-wrap on desktop?

Attachments (1)

  • menu-header-a-wrap.jpg
    menu-header-a-wrap.jpg 36.1 KB

11 Answers

Toufiq - Staff

2 weeks ago #Permalink
Hi there,

Thanks for your query. Your query is very useful to us. We have did it to work with the off-canvas. If we didn't the under menu dropdown menu will not be appeared on the mobile device. I hope you will understand.

-Thanks
Hi there,

Thank you for your reply. Could the link be "#" at least, since it doesn't reload the page?

Greetings from Germany

Toufiq - Staff

2 weeks ago #Permalink
Hi there,

Thank you for your reply. Could the link be "#" at least, since it doesn't reload the page?

Greetings from Germany


Hi there, You can choose the menu type URL & set # symbol inside the input box. Thanks
Surely, that is a way to solve this. But then, the navigation items would be a "#"-link on off-canvas too, right?

Toufiq - Staff

2 weeks ago #Permalink
Surely, that is a way to solve this. But then, the navigation items would be a "#"-link on off-canvas too, right?


Yes :)

https://prnt.sc/pyvao8
(Following…)
Surely, that is a way to solve this. But then, the navigation items would be a "#"-link on off-canvas too, right?


Yes :)

https://prnt.sc/pyvao8


this is not a fix.. what a joke,

Toufiq - Staff

2 weeks ago #Permalink
Hi there,

If you found a problem that could be a fix. But, there is no problem found.

I have checked also the Joomla default Template Protostar. Please check the screenshot.

https://prnt.sc/pzwdw1

-Thanks
Hi Toufiq,

there was no fix, only the workaround with external-url with "#"... My customer ain't happy with this solution. Need to set those menu-items which are only headings or separators in a span-tag or like the protostar-solution in a font-tag. I started to crawl through the php code to see if I could do this by myself and came along this menu.php found in root/plugins/system/helixultimate/core/classes. This php-data is loaded into the menu.php found in root/templates/shaper_helixultimate/features.

As the problem is coming up only on mega-menu, the fix should be done in the php-file which contains the functions for the mega-menu. I found some cases, which are true if the menu-item is set as separator or menu-heading, but there's no code entry (line 108-114; check the attachment).

I think that logically, setting up a switch which is turning the a-tag into a span-tag / font-tag when the menu item is listed as separator or heading would be enough but I can't do it by myself because my knowledge of php is limited yet and I don't want to let my customer wait until my knowledge in php is better ¯\_(ツ)_/¯ so I really hope you guys could help.

Attachments (1)

  • menu-separator-heading.jpg
    menu-separator-heading.jpg 134.1 KB

Toufiq - Staff

2 weeks ago #Permalink
Hi there,

To add anchor tag for the mobile device. Here is the file location.

templates/shaper_helixultimate/html/mod_menu/default_heading.php
https://prnt.sc/q02o1g

-Thanks
PS: I remember, even in HELIX3 there was a long discussion about the correct/preferred markup for headings and separators. Related Helix3 topic:
https://www.joomshaper.com/forums/menu-type-separator-link
Even older topic:
https://www.joomshaper.com/forums/heading-and-separator-menu-type-link-issues-fixed
I believe nothing has been changed by Joomshaper!?

IMHO, it those menuitem types should not output a real link tag. Although it can be a dilemma, because of dropdown issues in the off-canvas menu. Maybe users should be advised to use ExternalURL for dropdown behavior. And Headings/TextSeparators for structural ordering. IMHO the naming already implies the correct usage.

BTW, there are some CSS hacks/tricks to suppress the link behavior. I have used this method in Helix3.


There are no replies made for this post yet.
Be one of the first to reply to this post!

Leaderboard (30 days)

Paul Frankowski

Paul Frankowski

Total Accepted Answers: 109
Toufiq

Toufiq

Total Accepted Answers: 64
Sifat

Sifat

Total Accepted Answers: 44
Mehtaz Afsana Borsha

Mehtaz Afsana Borsha

Total Accepted Answers: 17
Rashida Rahman

Rashida Rahman

Total Accepted Answers: 17

118

Templates

305769

Community Users

Newsletter

Don’t miss any updates of our new templates and extensions and all the astonishing offers we bring for you.
We never spam

Joomla! ® name is used under a limited license from Open Source Matters in the United States and other countries. JoomShaper.com is not affiliated with or endorsed by Open Source Matters or the Joomla! Project.

Connect Us