This repository was archived by the owner on Oct 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
This repository was archived by the owner on Oct 25, 2021. It is now read-only.
Navigation Menu helper doesnt work correctly #2
Copy link
Copy link
Open
Description
At least for 3 levels menu the output is not correct. See for a demo menu the output:
return [
[
'label' => 'Element 1',
'uri' => '/blabla',
'pages' => [
[
'label' => 'Element 1.1',
'uri' => '#'
],
[
'label' => 'Element 1.2',
'uri' => '#'
],
[
'label' => 'Element 1.3',
'uri' => '#'
],
[
'label' => 'Element 1.4',
'uri' => '#'
],
[
'label' => 'Element 1.5',
'uri' => '#'
],
[
'label' => 'Element 1.6',
'uri' => '#'
],
]
],
[
'label' => 'Element 2',
'uri' => '/blabla',
'pages' => [
[
'label' => 'Element 2.1',
'uri' => '#',
'pages' => [
[
'label' => 'Element 2.1.1',
'uri' => '#'
],
[
'label' => 'Element 2.1.2',
'uri' => '#'
],
[
'label' => 'Element 2.1.3',
'uri' => '#'
],
]
],
[
'label' => 'Element 2.2',
'uri' => '#',
'pages' => [
[
'label' => 'Element 2.2.1',
'uri' => '#'
],
[
'label' => 'Element 2.2.2',
'uri' => '#'
],
[
'label' => 'Element 2.2.3',
'uri' => '#'
],
[
'label' => 'Element 2.2.4',
'uri' => '#'
],
]
],
]
],
[
'label' => "Element 3",
'uri' => '#'
],
[
'label' => 'Element 4',
'uri' => '#'
]
];
<ul class="navbar-nav mr-auto navbarMainLeft">
<li class="nav-item dropdown">
<a id="menu-d41d8cd98f00b204e9800998ecf8427e" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" role="button" href=" #" class="dropdown-toggle nav-link">Element 1</a>
<div class="dropdown-menu" area-labelled-by="menu-d41d8cd98f00b204e9800998ecf8427e">
<a href=" #" class="dropdown-item">Element 1.1</a>
<a href=" #" class="dropdown-item">Element 1.2</a>
<a href=" #" class="dropdown-item">Element 1.3</a>
<a href=" #" class="dropdown-item">Element 1.4</a>
<a href=" #" class="dropdown-item">Element 1.5</a>
<a href=" #" class="dropdown-item">Element 1.6</a>
</div>
</li>
<li class="nav-item dropdown">
<a id="menu-d41d8cd98f00b204e9800998ecf8427e" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" role="button" href=" #" class="dropdown-toggle nav-link">Element 2</a>
<div class="dropdown-menu" area-labelled-by="menu-d41d8cd98f00b204e9800998ecf8427e">
<a href=" #" class="dropdown-item">Element 2.1</a>
<div class="dropdown-menu" area-labelled-by="menu-d41d8cd98f00b204e9800998ecf8427e">
<a href=" #" class="dropdown-item">Element 2.1.1</a>
<a href=" #" class="dropdown-item">Element 2.1.2</a>
<a href=" #" class="dropdown-item">Element 2.1.3</a>
</div>
<a href=" #" class="dropdown-item">Element 2.2</a>
<div class="dropdown-menu" area-labelled-by="menu-d41d8cd98f00b204e9800998ecf8427e">
<a href=" #" class="dropdown-item">Element 2.2.1</a>
<a href=" #" class="dropdown-item">Element 2.2.2</a>
<a href=" #" class="dropdown-item">Element 2.2.3</a>
<a href=" #" class="dropdown-item">Element 2.2.4</a>
</div>
</li>
<li class="nav-item"> <a href=" #" class="nav-link">Element 3</a>
<li class="nav-item"> <a href=" #" class="nav-link">Element 4</a>
</li>
</ul>
You can see the div for Element 2.1 is not closed
<div class="dropdown-menu" area-labelled-by="menu-d41d8cd98f00b204e9800998ecf8427e">
And also that Element 3 had not a closed li.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels