Skip to content
Snippets Groups Projects
Commit 70ceff84 authored by Henry Odiete's avatar Henry Odiete Committed by Nikolay Lobachev
Browse files

Issue #2876440 by henry.odiete, LOBsTerr: Children of disabled parent visible

parent ccf0bf81
No related branches found
No related tags found
No related merge requests found
......@@ -1500,8 +1500,7 @@ class SuperfishBlock extends SystemMenuBlock {
$parameters = (new MenuTreeParameters())
->setMinDepth($level)
->setMaxDepth($maxdepth)
->setActiveTrail($this->menuActiveTrail->getActiveTrailIds($menu_name))
->onlyEnabledLinks();
->setActiveTrail($this->menuActiveTrail->getActiveTrailIds($menu_name));
// For menu blocks with start level greater than 1, only show menu items
// from the current active trail. Adjust the root according to the current
......
......@@ -101,16 +101,15 @@ function template_preprocess_superfish_menu_items(array &$variables) {
->getActiveTrailIds($element['#menu_name']);
foreach ($menu as $menu_item) {
// Menu link properties.
$link = $menu_item->link->getPluginDefinition();
if (NULL !== $menu_item->link &&
!($menu_item->link instanceof InaccessibleMenuLink)) {
!($menu_item->link instanceof InaccessibleMenuLink) && $link['enabled']) {
$item_class = $link_class = [];
$multicolumn_wrapper = $multicolumn_column = $multicolumn_content = $nolink = FALSE;
// Menu link properties.
$link = $menu_item->link->getPluginDefinition();
$item = [
'id' => $link['id'],
'text' => $menu_item->link->getTitle(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment