Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
superfish
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
superfish
Commits
70ceff84
Commit
70ceff84
authored
1 year ago
by
Henry Odiete
Committed by
Nikolay Lobachev
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2876440
by henry.odiete, LOBsTerr: Children of disabled parent visible
parent
ccf0bf81
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Plugin/Block/SuperfishBlock.php
+1
-2
1 addition, 2 deletions
src/Plugin/Block/SuperfishBlock.php
superfish.theme.inc
+3
-4
3 additions, 4 deletions
superfish.theme.inc
with
4 additions
and
6 deletions
src/Plugin/Block/SuperfishBlock.php
+
1
−
2
View file @
70ceff84
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
superfish.theme.inc
+
3
−
4
View file @
70ceff84
...
...
@@ -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
(),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment