Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
menu_css_names
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
menu_css_names
Merge requests
!21
Issue
#3032608
: remove module template
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Issue
#3032608
: remove module template
issue/menu_css_names-3032608:3032608-incompatible-admin-menu
into
8.x-1.x
Overview
0
Commits
1
Pipelines
0
Changes
2
Merged
aaron.ferris
requested to merge
issue/menu_css_names-3032608:3032608-incompatible-admin-menu
into
8.x-1.x
11 months ago
Overview
0
Commits
1
Pipelines
0
Changes
2
Expand
Closes
#3032608
0
0
Merge request reports
Compare
8.x-1.x
8.x-1.x (base)
and
latest version
latest version
4124b479
1 commit,
11 months ago
2 files
+
4
−
81
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
templates/menu-css-names--menu.html.twig deleted
100644 → 0
+
0
−
58
Options
{#
/**
* @file
* Theme override to display a menu.
*
* Available variables:
* - menu_name: The machine name of the menu.
* - items: A nested list of menu items. Each menu item contains:
* - attributes: HTML attributes for the menu item.
* - below: The menu item child items.
* - title: The menu link title.
* - url: The menu link url, instance of \Drupal\Core\Url
* - localized_options: Menu link localized options.
* - is_expanded: TRUE if the link has visible children within the current
* menu tree.
* - is_collapsed: TRUE if the link has children within the current menu tree
* that are not currently visible.
* - in_active_trail: TRUE if the link is in the active trail.
*/
#}
{%
import
_self
as
menus
%}
{#
We call a macro which calls itself to render the full tree.
@see http://twig.sensiolabs.org/doc/tags/macro.html
#}
{{
menus.menu_links
(
items
,
attributes
,
0
)
}}
{%
macro
menu_links
(
items
,
attributes
,
menu_level
)
%}
{%
import
_self
as
menus
%}
{%
if
items
%}
{%
if
menu_level
==
0
%}
<ul
{{
attributes.addClass
(
'menu'
)
}}
>
{%
else
%}
<ul
class=
"menu"
>
{%
endif
%}
{%
for
item
in
items
%}
{%
set
classes
=
[
'menu-item'
,
item.is_expanded
?
'menu-item--expanded'
,
item.is_collapsed
?
'menu-item--collapsed'
,
item.in_active_trail
?
'menu-item--active-trail'
,
'hello-here2'
,
item.menu_name_class
]
%}
<li
{{
item.attributes.addClass
(
classes
)
}}
>
{{
link
(
item.title
,
item.url
)
}}
{%
if
item.below
%}
{{
menus.menu_links
(
item.below
,
attributes
,
menu_level
+
1
)
}}
{%
endif
%}
</li>
{%
endfor
%}
</ul>
{%
endif
%}
{%
endmacro
%}
Loading