Navigation: submenu trail, no "active" on first link
I use the standard navigation module. The navigation looks like this:
Code:
<ul class="level_1">
<li class="first">link1
<li class="submenu trail">link2
<ul class="level_2">
<li class="active first">link3
<li class="sibling">link4[/list]
[/list]
The first link in the submenu is active and has class "active". So far so good, I give every active link an underline using the "active" class.
This is the problem:
Code:
<ul class="level_1">
<li class="first">link1
<li class="submenu trail">link2
<ul class="level_2">
<li class="sibling first">link3
<li class="sibling">link4[/list]
[/list]
Link2 is selected, but there's no "active" class... This happens only when this link has a submenu.
Why is the "active" class not shown?
I cannot use the "trail" class as this class is added to all links inside an open submenu, so then all have an underline.
:cry:
Re: Navigation: submenu trail, no "active" on first link
Have you modified the standard navigation subtemplate? By default, Contao uses the "nav_default" subtemplate when you add a new front end module of type "Navigation menu".
Re: Navigation: submenu trail, no "active" on first link
I found the problem...
The first item wasn't properly forwarded, so the menu didn't build correctly.
I corrected the site structure and now it works well : )
:shock: