Commit 615effdc authored by Stairmaster's avatar Stairmaster Committed by Nicolas Widart

Add CSS classes to the menu items with children (#321)

* Added CSS classes to the menu items with children

* Remove whitespace at the end of lines
parent bdf2582e
......@@ -101,7 +101,16 @@ class MenuServiceProvider extends ServiceProvider
public function addItemToMenu(Menuitem $item, Builder $menu)
{
if ($this->hasChildren($item)) {
$this->addChildrenToMenu($item->title, $item->items, $menu, ['icon' => $item->icon, 'target' => $item->target]);
$this->addChildrenToMenu(
$item->title,
$item->items,
$menu,
[
'icon' => $item->icon,
'target' => $item->target,
'class' => $item->class,
]
);
} else {
$target = $item->link_type != 'external' ? $item->locale . '/' . $item->uri : $item->url;
$menu->url(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment