Skip to content

Commit

Permalink
Merge pull request #318 from felixhahnweilheim/fix-menu-active
Browse files Browse the repository at this point in the history
Fix active tab in Admin Menu
  • Loading branch information
luke- committed Jan 2, 2024
2 parents 81a5bb6 + 43924ed commit e9da3d5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Events.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ public static function onAdminMenuInit($event)
'group' => 'manage',
'icon' => '<i class="fa fa-file-text-o"></i>',
'isActive' => (Yii::$app->controller->module
&& Yii::$app->controller->module->id === 'custom_pages'
&& (Yii::$app->controller->id === 'page' || Yii::$app->controller->id === 'config')),
&& (Yii::$app->controller->module->id === 'custom_pages'
&& (Yii::$app->controller->id === 'page' || Yii::$app->controller->id === 'config'))
|| Yii::$app->controller->module->id == 'template'),
'sortOrder' => 300,
'isVisible' => true,
]);
Expand Down
3 changes: 3 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Changelog
=========
TBA
---
- Fix: Highlight admin menu entry when "Template" page is active

1.9.6 (December 12, 2023)
-------------------------
Expand Down

0 comments on commit e9da3d5

Please sign in to comment.