Yii2: Auto-expand Parent Menu

When you have multi-level menu and when a submenu item is selected, you want the parent to auto expand and set as active.

This is one thing I wish I had gone through the documentation┬ábefore spending hours extending the widget to achieve this. Because it’s already implemented by the framework!

All you need to do is to set activeParents property to true.

Leave a Reply

Your email address will not be published. Required fields are marked *