I have been using the following code to keep a menu open for several views related to a specific module:
'active' => in_array(\Yii::$app->controller->id,['dashboard'])
The problem I ran into is that when I added a new module that has a controller with the same name, it holds open the wrong menu items.
How do I get the active controller at the specific path, rather than just any controller named ‘dashboard’? I have the following controllers, each in their own module.