Support Forum

Please note that this forum is only available to you in read only mode. In order to contribute to this conversation you will need to renew your subscription.

current mainmenu active on subsite

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Hello
how to keep the mainmenuentry "active“, when i open a submenu/site?

regards

braunrob.myhostpoint.ch/leinwand/2015.html

marc
  • marc's Avatar
  • marc
  • 12 Month Developer
  • 101 posts
  • 3 Thanks
  • Karma: 0
Last Edit: 7 years 3 months ago by marc.
The administrator has disabled public write access.
Hi Marc,

By active you mean the link colour staying purple?

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
yes the navbar link acitve color
#990099

thx for help

regards

marc
  • marc's Avatar
  • marc
  • 12 Month Developer
  • 101 posts
  • 3 Thanks
  • Karma: 0
The administrator has disabled public write access.
I'm not that good with js so I'd probably use a class on the menu links and then style the link

I kind of fake active style

Would that be an option?

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
Hi Robert
I have been asking for a while and found a script to add a class to the divider menu links:

<script>jQuery(document).ready(function($)
{
 var $menueheader = $("span.nav-header").parent("li.parent.deeper");
 var $dividerSelectors = $("li.divider.deeper");
 
 $.merge($dividerSelectors, $menueheader).each(function(){
  if ($(this).find("li.active, li.alias-parent-active").length)
  {
   $(this).addClass("active");
  }
 });
}</script>

but i think there are other classnames in gazetta

span.navbar-header ?

Or how can i bring to work?

regards

marc
  • marc's Avatar
  • marc
  • 12 Month Developer
  • 101 posts
  • 3 Thanks
  • Karma: 0
The administrator has disabled public write access.
Hi Marc,

What are you trying to do with this script?

What element is supposed to be active?

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
Sorry for the delayed response
but i had a lot of work and have to finish this project now.
We need activated mainmenupoints in each submenuitem/article.

example
Leinwand menuitem should be active in Leinwand/2015/Pflanzplan VIII/1-3

mainmenuitem not active

I found this solution: active class for menus

How can i use it for gazetta?

added the jquery script to the

Before closing head tag field with no effects

thx for help

regards marc
  • marc's Avatar
  • marc
  • 12 Month Developer
  • 101 posts
  • 3 Thanks
  • Karma: 0
The administrator has disabled public write access.
Hi Marc,

I can't see how this can work as the menu item you are targeting isn't part of the menu as such with a link

Do you get an active link if you add the sidebar menu on the page?

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
oh i see the problem..

The splitmenu isn't properly linked to the mainmenu, it doesn't appear in the sidebar.
I have to fix that

regards
  • marc's Avatar
  • marc
  • 12 Month Developer
  • 101 posts
  • 3 Thanks
  • Karma: 0
The administrator has disabled public write access.
Yep that is the problem I see with that script

Best of luck

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Happy Campers