Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dic-global-dev
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Manzar Hussain
dic-global-dev
Commits
5f2c51e3
Commit
5f2c51e3
authored
Jan 14, 2021
by
Manzar Hussain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sidebar menu
parent
a7acdc23
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
0 deletions
+62
-0
menu--sidebar-investor.html.twig
themes/custom/envigo/templates/navigation/ menu--sidebar-investor.html.twig
+62
-0
No files found.
themes/custom/envigo/templates/navigation/ menu--sidebar-investor.html.twig
0 → 100644
View file @
5f2c51e3
{#
/**
* @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 https://twig.symfony.com/doc/1.x/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
%}
<div
class=
"ls_sbmenu sb_dd_m_data"
>
<ul>
{%
else
%}
<em><i
class=
"fa fa-angle-down"
aria-hidden=
"true"
></i></em>
<div
class=
"header-nav-item-child-list"
>
<ul
class=
"pure-g"
>
{%
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'
,
]
%}
<li>
{{
link
(
item.title
,
item.url
)
}}
{%
if
item.below
%}
{{
menus.menu_links
(
item.below
,
attributes
,
menu_level
+
1
)
}}
{%
endif
%}
</li>
{%
endfor
%}
</ul>
</div>
{%
endif
%}
{%
endmacro
%}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment