Config "Expand all menu links" is not handled

Created on 28 June 2021, over 3 years ago
Updated 30 April 2024, 7 months ago

Problem/Motivation

Menu block level config "Expand all menu links" is no handled on build function.

Steps to reproduce

  1. Create a menu with parent child.
  2. Goto block layout page and place domain menu block to any region.
  3. Edit menu block config and check "Expand all menu links"
  4. Goto frontend page and using devel, print menu items and observe the menu properly is_expanded is still "false"

Proposed resolution

Like SystemMenuBlock.php need to add below code on this module plugin as well:

if ($this->configuration['expand_all_items']) {
      $parameters = new MenuTreeParameters();
      $active_trail = $this->menuActiveTrail->getActiveTrailIds($menu_name);
      $parameters->setActiveTrail($active_trail);
    }
    else {
      $parameters = $this->menuTree->getCurrentRouteMenuTreeParameters($menu_name);
    }
🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇮🇳India gaurav.bajpai

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024