Hi,

This may be me but I create a menu as normal. The active link works fine on all items except when one links to the home page. So if I create a link called "Home" pointing to "" it works but there is no "active" class on the

  • . Is this a bug? Is it a bootstrap issue or core issue?
  • Comments

    nickbits created an issue. See original summary.

    markhalliwell’s picture

    Version: 8.x-4.x-dev » 8.x-3.x-dev
    Category: Bug report » Support request
    Status: Active » Closed (works as designed)

    Use <front> instead of "".

    nickbits’s picture

    Status: Closed (works as designed) » Active

    Hi Mark,

    Sorry didn't spot that in my original post - should have said

    So if I create a link called "Home" pointing to "<front>" it works but there is no "active" class on the LI. I have tried other variations but anything linking to the home page doesn't get an active class on the LI. Any other menu item/page is fine. First major project on the D8 version so may be me missing something! But afraid it is not working for me.

    markhalliwell’s picture

    Status: Active » Closed (duplicate)

    I did a little digging (by searching for other issues) and determined that this is actually a flaw of core itself #1578832: Class active-trail not added to li element when linking to front page.

    However, you may be able to fix it using https://www.drupal.org/project/menu_trail_by_path