mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 10:14:03 +00:00
Improve isActive logic
This commit is contained in:
parent
ff8b594cbd
commit
791e8433f5
1 changed files with 1 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue