How to Reference and Display Menus in Drupal Using Menu Reference Render Module or Alternative Methods

Created on 11 July 2024, 5 months ago
Updated 2 August 2024, 5 months ago

How to use "Paragraph Bundle" to display a specific menu branch? There is a possibility?

There is such a solution - use “Simple”, and add line-by-line links to the required pages into it. But this is long and inconvenient.

💬 Support request
Status

Fixed

Version

1.0

Component

Code

Created by

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

Comments & Activities

  • Issue created by @zub00
  • Assigned to flashwebcenter
  • Status changed to Fixed 5 months ago
  • 🇺🇸United States flashwebcenter Austin TX

    Hello,

    There is a contributed module, Menu Reference Render , that allows you to reference a menu. To use it, create an entity reference field and, under manage display, change the format to "Rendered menu."

    However, there is an alternative method. When you insert ../admin/structure/block in any region (views, menu, search, etc.), Drupal converts it to a block, making it available for this theme anywhere.

    In paragraph bundles, there is a bundle named "Drupal Block." To insert a menu using this method, you can add the menu to any region, configure it, and then add a "Drupal Block" paragraph type in the content type, referencing the menu.
    I have implemented this on the demo site. The menu on this page is the same as the one on the right side.

    Best wishes,
    Alaa

  • Hello. The alternative method seemed to me the most convenient. Thank you. Everything worked out.

  • Hello. Your method requires displaying a menu through a “block diagram”. Thus, "Bundle drupal block" will duplicate the existing menu. I need to display blocks on the start page of the site that contain part of the existing menu (i.e., not the entire menu branch), BUT at the same time, this menu should not be on the start page. Is it possible to do this?

  • 🇺🇸United States flashwebcenter Austin TX

    Hello,

    I need to display blocks on the start page of the site that contain part of the existing menu (i.e., not the entire menu branch)

    You cannot display part of the menu; you can only display the entire menu as a rendered block on any page, as long as the block is active.

    Best wishes,
    Alaa

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

Production build 0.71.5 2024