From 509e8f6924da293c0b1f302b4dcfe9c2c963a1a2 Mon Sep 17 00:00:00 2001 From: Clifford James van den Bos Date: Fri, 1 Apr 2016 23:02:59 +0200 Subject: [PATCH] Add multilevel menu --- config/adminlte.php | 40 +++++++++++++++++++- resources/views/page.blade.php | 16 +------- resources/views/partials/menu-item.blade.php | 18 +++++++++ 3 files changed, 59 insertions(+), 15 deletions(-) create mode 100644 resources/views/partials/menu-item.blade.php diff --git a/config/adminlte.php b/config/adminlte.php index 1e93d17f..1c63f8e4 100644 --- a/config/adminlte.php +++ b/config/adminlte.php @@ -95,6 +95,44 @@ 'url' => 'admin/settings', 'icon' => 'lock' ], + [ + 'text' => 'Multilevel', + 'icon' => 'share', + 'submenu' => [ + [ + 'text' => 'Level One', + 'url' => '#', + ], + [ + 'text' => 'Level One', + 'url' => '#', + 'submenu' => [ + [ + 'text' => 'Level Two', + 'url' => '#', + ], + [ + 'text' => 'Level Two', + 'url' => '#', + 'submenu' => [ + [ + 'text' => 'Level Three', + 'url' => '#', + ], + [ + 'text' => 'Level Three', + 'url' => '#', + ], + ], + ], + ], + ], + [ + 'text' => 'Level One', + 'url' => '#', + ], + ], + ], ], -]; \ No newline at end of file +]; diff --git a/resources/views/page.blade.php b/resources/views/page.blade.php index e72f8706..9b825ffb 100644 --- a/resources/views/page.blade.php +++ b/resources/views/page.blade.php @@ -49,19 +49,7 @@ @@ -92,4 +80,4 @@ @section('adminlte_js') @yield('js') -@stop \ No newline at end of file +@stop diff --git a/resources/views/partials/menu-item.blade.php b/resources/views/partials/menu-item.blade.php new file mode 100644 index 00000000..2e77d438 --- /dev/null +++ b/resources/views/partials/menu-item.blade.php @@ -0,0 +1,18 @@ +@if (is_string($item)) +
  • {{ $item }}
  • +@else +
  • + + + {{ $item['text'] }} + @if (isset($item['submenu'])) + + @endif + + @if (isset($item['submenu'])) + + @endif +
  • +@endif