Skip to content

Commit

Permalink
Add ability to link to external url
Browse files Browse the repository at this point in the history
  • Loading branch information
nWidart committed Dec 29, 2014
1 parent 5b7bfbe commit 68fcff4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Composers/NavigationViewComposer.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@ public function addItemToMenu($item, Builder $menu)
if ($this->hasChildren($item)) {
$this->addChildrenToMenu($item->title, $item->children, $menu);
} else {
$menu->add([
'url' => $item->uri,
'title' => $item->title,
]);
$target = $item->uri ?: $item->url;
$menu->url(
$target,
$item->title,
['target' => $item->target]
);
}
}

Expand Down

0 comments on commit 68fcff4

Please sign in to comment.