-
Notifications
You must be signed in to change notification settings - Fork 233
Dividers
Shea Lewis edited this page Nov 16, 2015
·
1 revision
Adding a divider after a menu item is simple, and you have a couple ways of going about it as detailed below.
$menu->add('Item Link', 'item/link')->divide();
$menu->add('Item Link', 'item/link');
$menu->divide();
Both methods above will achieve the same results, by adding a new divider item after your link. So, if you were to use the asUl()
method, you would get the following HTML:
<ul>
<li><a href="item/link">Item Link</a></li>
<li class="divider"></li>
</ul>
If you are building your own menu from scratch (a Bootstrap navbar for example), you can easily check to see if an item has a divider and add it:
@if ($item->divider)
<li {{ \HTML::attributes($item->divider) }}></li>
@endif
- Active Link Detection
- Append and Prepend
- Attributes
- Dividers
- [Meta Data](Meta Data)
- [Sort By](Sort By)