Solved Templates

Limit menu levels on megamenu?

Asked by Ignacio Granados 4 years ago Last activity 4 years ago

Hi,

I have a main menu with 3 levels (in joomla). Is it possible to limit the megamenu (template livesports) to only 2 fisrt levels (as you do in standard menu module in joola)?

Accepted answer

Marked as the solution
Paul Frankowski Senior Staff
4 years ago · edited

I assume that you want to hide it in Desktop view only:

@media (min-width: 840px) {
.sp-megamenu-parent .sp-dropdown.sp-dropdown-sub .sp-dropdown-inner,
body.ltr .sp-megamenu-parent .sp-dropdown .sp-dropdown-items .sp-has-child > a::after 
{display: none; visibility: hidden;}
}

Short info:

  1. 1st line of code: use CSS for screen size larger than 840px it means all Laptops and Desktops
  2. 2nd line of code: class of 3rd submenu box
  3. 3rd line of code: class of ">" arrow
  4. Hide above 2 & 3 elements.
  5. Close rule (1)

4 more replies

Paul Frankowski Senior Staff

Hi Ignacio,

so you want to hide submenu items from 3rd level, am I right?
From Mega Menu settings it's not possible, the only way to hide them is by using extra Custom CSS that would hide from public menu items below 2nd level.

so you have to hide arrow and submenu for 3rd level. Probably it can be done in 4 lines of CSS code.

Helix Ultimate based template?

Ignacio Granados Asked this

Thanks, Paul. It works great!

Log in to reply.