Display the same menu on a subpage of the group

Created on 31 January 2025, 2 months ago

Problem/Motivation

I'm trying to display the Group page menu. Everything is fine with the module's Group Content menu. But when I try to display the same menu on a subpage of the group, the menu is not displayed, adding the group menu via "Layout Builder", as if the context was not passed.

Do you know how can I do this ?

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇨🇦Canada dimitrihokonmoy

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

Comments & Activities

  • Issue created by @dimitrihokonmoy
  • 🇵🇹Portugal lolgm

    I had the same problem, the only way I found to overcome it was:

    • Create the "Menu" view mode in the Group and add the menu block in this view mode.
    • Create a Group view.
    • Add rendered entity field and set view mode to "Menu".
    • Activate a "Group relationship" and choose the plugin for the desired content entity, in my case it is "Group node (Page)"
    • Add the contextual filter "Group relationship: Content" with the relationship that was created previously.
    • Within the contextual filter there are several ways to obtain the current content. I chose to use the "Specify validation criteria" option with the "Content" validator.

    For this solution to work, the patch in the group is also required: 📌 More contexts needed Needs work

    It's not the most elegant solution but it was the only way I found to get the group menu block to work in the LB of the group's subpages.

  • 🇨🇦Canada dimitrihokonmoy

    What version did you use this patch (#2815971) on?
    I am working with version 3.0.5 and it doesn't seem to work for this version...

  • 🇵🇹Portugal lolgm

    I'm using the following versions:

    • group: 3.3.4
    • group_content_menu: 3.0.5
    • Patch #2815971: ​​MR !159
Production build 0.71.5 2024