verbb / cp-nav

Control Panel Nav is a Craft CMS plugin to help manage your Control Panel navigation.
MIT License
129 stars 11 forks source link

Sub-items not possible to make opened by default #135

Closed alexkuzmin closed 5 months ago

alexkuzmin commented 5 months ago

Describe the bug

Earlier, there was an option to have sub-items open by default, now they are always closed.

Steps to reproduce

  1. Make the item a sub-item of another item.
  2. Look at how it appears in the menu - it can only be seen by clicking the down arrow.

Craft CMS version

5

Plugin version

5.0.0

Multi-site?

No response

Additional context

No response

engram-design commented 5 months ago

This was actually largely removed due to Craft 5 now supporting nested menu items that you could toggle. Rather than re-inventing the wheel, we'd rather take the native approach for this.

I'd say this now comes under the realm of a Craft core feature request. You can toggle menu items that have subnavs open, but they aren't retained. This should be pretty straightforward to implement through the use of a cookie or localstorage.

So for this reason, I think we'll leave it up to Craft to implement!