46 lines
2.1 KiB
PHP
46 lines
2.1 KiB
PHP
<div class="main-nav">
|
|
<div class="container">
|
|
<nav id="navigation1" class="navigation">
|
|
<div class="nav-header">
|
|
<a class="nav-logo" href="{{ site_url() }}">
|
|
<img src="{{ site_url(SITEVARS->primary_logo) }}" class="white-logo" alt="">
|
|
<img src="{{ site_url(SITEVARS->secondary_logo) }}" class="dark-logo" alt="">
|
|
</a>
|
|
<div class="nav-toggle"></div>
|
|
</div>
|
|
<div class="nav-menus-wrapper">
|
|
<ul class="nav-menu align-to-right">
|
|
|
|
@php
|
|
$menuItems = MPCMS::getMenuItems('header-menu');
|
|
@endphp
|
|
|
|
@foreach ($menuItems as $menuItem)
|
|
@php
|
|
$menuItem->alias = str_replace('-', '_', $menuItem->alias);
|
|
$routeName = $menuItem->alias;
|
|
$routeUrl = route($routeName);
|
|
@endphp
|
|
<li>
|
|
<a href="{{ $routeUrl }}" >{{ $menuItem->title }}</a>
|
|
@if (!empty($menuItem->children))
|
|
<ul class="nav-dropdown">
|
|
@foreach ($menuItem->children as $menu)
|
|
@php
|
|
$menuRouteName = $menuItem->alias . '.' . $menu->alias;
|
|
$menuRouteUrl = route($menuRouteName);
|
|
@endphp
|
|
<li><a href="{{ $menuRouteUrl }}">{{ $menu->title }}</a></li>
|
|
@endforeach
|
|
</ul>
|
|
@endif
|
|
</li>
|
|
|
|
@endforeach
|
|
|
|
|
|
</ul>
|
|
</div>
|
|
</nav>
|
|
</div>
|
|
</div> |