Add option to always render parent menu item

Created on 19 September 2019, over 5 years ago
Updated 20 May 2024, 7 months ago

Problem/Motivation

If you choose a menu level greater than 1, menus render the only the children of the parent menu item at that level. It's often desirable to also render that parent item in the menu as well. There are several other open issues requesting similar functionality, but usually limited in scope (only when fixed parent selected, only when following active trail, etc.):

It should be possible to include the parent menu item in the menu regardless of what other menu settings are in use.

Proposed resolution

Leverage the fact that a NULL minimum depth will cause the parent to be included in the resulting menu tree by default. If the render parent setting is true, avoid setting a minimum depth the for the menu tree.

Remaining tasks

  1. Commit

User interface changes

Add a "Render parent" checkbox to the advanced block options

API changes

None.

Data model changes

Add a boolean "render_parent" setting to config.

Release notes snippet

Added an option to always include parent menu item with active child items.

Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

🇺🇸United States justcaldwell Austin, Texas

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024