From 791e8433f5713c5665664b7af7b1273ae8259bef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Fri, 24 Apr 2020 18:06:47 +0200 Subject: [PATCH] Improve isActive logic --- docs/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/config.php b/docs/config.php index 808ebc3..5fd8950 100644 --- a/docs/config.php +++ b/docs/config.php @@ -31,7 +31,7 @@ return [ // helpers 'isActive' => function ($page, $path) { - return ends_with(trimPath($page->getPath()), trimPath($path)); + return ends_with(trimPath($page->getPath()), trimPath($page->version() . '/' . $path)); }, 'isActiveParent' => function ($page, $menuItem) { if (is_object($menuItem) && $menuItem->children) {