fix active hierarchy in menu and megamenu

This commit is contained in:
Ludovic CANDELLIER
2023-03-14 21:46:57 +01:00
parent 3943fc033f
commit 695d23a139
8 changed files with 74 additions and 15 deletions

View File

@@ -3,9 +3,9 @@
@endphp
<div class="container p-0">
<div class="row m-0 shadow bg-white p-2 w-100">
<div class="row m-0 shadow bg-white p-2 w-100 @if ( in_array($menu['id'], [$category['id'], $category['parent_id']])) active @endif">
<div class="col mb-4">
<a class="green-dark @if (($category['id'] ?? false) == $menu['id']) active @endif" href="{{ route('Shop.Categories.show', ['id' => $menu['id']]) }}">
<a class="green-dark" href="{{ route('Shop.Categories.show', ['id' => $menu['id']]) }}">
<div class="w-100"><strong>Tous les articles</strong></div>
</a>
@for ($i = 0; $i < count($submenu[0]); $i++)