Problem/Motivation

The current implementation for "field_slideshow_inherit" assumes, that children entities of the selected menu items are having real menu entries.

In certain cases this might not be true and the trail is just created by path (e.g. using https://www.drupal.org/project/menu_trail_by_path) or the submenu items are disabled to not show them in the navigation.

A further problem is, that the current implementation doesn't seem to work if the sub-item is a taxonomy term and not a node. Even when using taxonomy menu to create real (and active) menu items for the children menu items, the parent is not detected.

Steps to reproduce

Good examples can be found at DD customer project, for example:
- "News" nodes (no menu item, but below the news menu item, which has field_slideshow_inherit for children enabled and the breadcrumb trail shows the news nodes as children
- Distr. Downloads are taxonomy terms with active menu items and should inherit their parent menu item slideshow, but does not work. As a workaround we're using a separate view for now.

Proposed resolution

Don't assume real menu items, instead use the breadcrumb trails links to traverse up, if possible.

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Anybody created an issue. See original summary.

anybody’s picture

This should be VERY helpful: https://atendesigngroup.com/articles/drupal-8-menu-system-generate-previ...

And sadly shows, that it's a bit of a mess to get the parent active trail parent(s).

anybody’s picture

Category: Feature request » Bug report
Priority: Normal » Major

Marking this as bug, as it didn't work as expected yet.

anybody’s picture

Status: Active » Reviewed & tested by the community

Here we go finally. Detecting parent menu item header slideshows no works based on the active trail :party:!!

Still it doesn't work for the special case of taxonomy_menu items, as they use a different plugin, but that should be part of a minor follow-up.

  • Anybody committed fcd2631 on 4.x
    Issue #3309682 by Anybody: Detect parent menu item from trail to ensure...
anybody’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.