MainNavBar: hide navigation when not logged in
This commit is contained in:
parent
0a8da104cc
commit
febe7bb405
@ -31,25 +31,32 @@ class MainNavBar extends NavBar
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#', $this->innerMenuId, '" aria-controls="', $this->innerMenuId, '" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
</button>';
|
||||
|
||||
if (Registry::get('user')->isLoggedIn())
|
||||
{
|
||||
echo '
|
||||
<div class="collapse navbar-collapse justify-content-end" id="', $this->innerMenuId, '">
|
||||
<ul class="navbar-nav mb-2 mb-lg-0">';
|
||||
|
||||
$mainMenu = new MainMenu();
|
||||
$this->renderMenuItems($mainMenu->getItems());
|
||||
$mainMenu = new MainMenu();
|
||||
$this->renderMenuItems($mainMenu->getItems());
|
||||
|
||||
echo '
|
||||
echo '
|
||||
<li class="nav-divider d-none d-lg-inline"></li>';
|
||||
|
||||
$adminMenu = new AdminMenu();
|
||||
$this->renderMenuItems($adminMenu->getItems());
|
||||
$adminMenu = new AdminMenu();
|
||||
$this->renderMenuItems($adminMenu->getItems());
|
||||
|
||||
$userMenu = new UserMenu();
|
||||
$this->renderMenuItems($userMenu->getItems());
|
||||
$userMenu = new UserMenu();
|
||||
$this->renderMenuItems($userMenu->getItems());
|
||||
|
||||
echo '
|
||||
</ul>
|
||||
</div>';
|
||||
}
|
||||
|
||||
echo '
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user