Skip to content

Commit 8e14462

Browse files
committed
Bring back is_current. Closes #1300
1 parent 1c10ec1 commit 8e14462

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Tags/Nav.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,12 @@ public function breadcrumbs()
3838
$this->content = trim($this->content);
3939
}
4040

41-
$output = $this->parseLoop($crumbs->values()->toAugmentedArray());
41+
$crumbs = $crumbs->values()->map(function ($crumb) {
42+
$crumb->setSupplement('is_current', URL::getCurrent() === $crumb->url());
43+
return $crumb;
44+
});
45+
46+
$output = $this->parseLoop($crumbs->toAugmentedArray());
4247

4348
if ($backspaces = $this->params->int('backspace', 0)) {
4449
$output = substr($output, 0, -$backspaces);

0 commit comments

Comments
 (0)