Results 1 to 3 of 3

Thread: Navigation: submenu trail, no "active" on first link

  1. #1
    New user
    Join Date
    09-22-11.
    Posts
    26

    Default 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:

  2. #2
    Community-Moderator xchs's Avatar
    Join Date
    06-19-09.
    Posts
    1,279

    Default 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".
    Contao Community Moderator
    → Support options

  3. #3
    New user
    Join Date
    09-22-11.
    Posts
    26

    Default 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:

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •