Open gbrock opened 9 years ago
Here's my alteration to the Bootstrap 3 sample code for items.blade.php from the wiki (not the cleanest, I know, but it works):
items.blade.php
<ul class="{{ $class or 'nav nav-tabs' }}"> @foreach($items as $item) <?php if($item->hasChildren()) { $item->attribute('class', $item->attribute('class') . ' dropdown'); } ?> <li {!! $item->attributes() !!}> @if($item->link) <a @if($item->hasChildren()) class="dropdown-toggle" data-toggle="dropdown" @endif href="{{ $item->url() }}"> {!! $item->title !!} @if($item->hasChildren()) <b class="caret"></b> @endif </a> @else {{$item->title}} @endif @if($item->hasChildren()) <ul class="{{ $submenu_class or 'dropdown-menu' }})"> @foreach($item->children() as $child) <li><a href="{{ $child->url() }}">{{ $child->title }}</a></li> @endforeach </ul> @endif </li> @if($item->divider) <li{{\HTML::attributes($item->divider)}}></li> @endif @endforeach </ul>
+1
Here's my alteration to the Bootstrap 3 sample code for
items.blade.php
from the wiki (not the cleanest, I know, but it works):