Module Description
Widget showing all menu links referencing the entity on entity edit form
Synopsis
The Menu Entity Index module builds and maintains an index of Menu Link Content entities and their referenced entities. It also provides some basic Views integration for Menu Link Content entities.
Features provided by the module:
* A database table that contains menu items and entities referenced by these menu items. Tracked information for each menu item includes menu name, menu level, entity type, bundle, entity id, uuid, langcode, parent entity type, parent id, parent uuid, target entity type, target bundle, target entity id and target langcode.
* Basic Views integration for Menu Link Content entities.
* A form field widget for entity forms that can be used to show a listing of all menu items that reference the entity on entity edit forms.
Potential Use Cases
This module primarily provides an integration of menu link content entities and the content they reference with Views. This is done by storing the relationship between a content entity and the menu links that reference it in a database table.
Potential uses include:
* Listing all content entities referenced by child menu items of a given parent menu item.
* Replacing the Menu Block or Mega Menu module with a custom View.
* Exposing menu items in a machine readable format via a View for a decoupled site or an external integration.
* Listing all menu links referencing the current entity on a entity edit form.
Example view display using views integration provided by Menu Entity Index
Requirements
This module depends on the menu_link_content module provided by Drupal Core. If you want to use the views integration, you also need the views module provided by Drupal Core.
Recommended modules
* Views (provided by Drupal Core), if you want to use the views integration.
Usage
* Go to the configuration page of the module at Configuration > Search and metadata > Menu Entity Index.
* Configure the menus and entity types that should be included in Menu Entity Index. For example, to track all menu items in the main menu, that reference content or taxonomy term entities, add Main navigation as a tracked menu and Content and Taxonomy term as tracked entity types and click on Save configuration.
* A batch process that scans the selected menus for referenced entities will be initiated. Once this batch process has finished, the module will keep track of additions, updates or deletions of menu items itself and the module is ready to use.
* If you want to show a listing of all menu items of an entity on its edit form, go to the Manage form display page of its bundle/entity type. If tracking is enabled for that entity type, you'll see a new Menu links field in the Disabled region. Move it to the desired position to enable it and click on the Save button.
* Make sure to look over the permissions of the module. There is one permission to configure module settings and one permission to view the menu links form widget on entity edit forms.
Exerpt from module configuration page
Credits
Current maintainers:
* Patrick Fey (feyp)
* David Franke (mirroar)
The development of this project has been partly sponsored by werk21 GmbH.
Synopsis
The Menu Entity Index module builds and maintains an index of Menu Link Content entities and their referenced entities. It also provides some basic Views integration for Menu Link Content entities.
Features provided by the module:
* A database table that contains menu items and entities referenced by these menu items. Tracked information for each menu item includes menu name, menu level, entity type, bundle, entity id, uuid, langcode, parent entity type, parent id, parent uuid, target entity type, target bundle, target entity id and target langcode.
* Basic Views integration for Menu Link Content entities.
* A form field widget for entity forms that can be used to show a listing of all menu items that reference the entity on entity edit forms.
Potential Use Cases
This module primarily provides an integration of menu link content entities and the content they reference with Views. This is done by storing the relationship between a content entity and the menu links that reference it in a database table.
Potential uses include:
* Listing all content entities referenced by child menu items of a given parent menu item.
* Replacing the Menu Block or Mega Menu module with a custom View.
* Exposing menu items in a machine readable format via a View for a decoupled site or an external integration.
* Listing all menu links referencing the current entity on a entity edit form.
Example view display using views integration provided by Menu Entity Index
Requirements
This module depends on the menu_link_content module provided by Drupal Core. If you want to use the views integration, you also need the views module provided by Drupal Core.
Recommended modules
* Views (provided by Drupal Core), if you want to use the views integration.
Usage
* Go to the configuration page of the module at Configuration > Search and metadata > Menu Entity Index.
* Configure the menus and entity types that should be included in Menu Entity Index. For example, to track all menu items in the main menu, that reference content or taxonomy term entities, add Main navigation as a tracked menu and Content and Taxonomy term as tracked entity types and click on Save configuration.
* A batch process that scans the selected menus for referenced entities will be initiated. Once this batch process has finished, the module will keep track of additions, updates or deletions of menu items itself and the module is ready to use.
* If you want to show a listing of all menu items of an entity on its edit form, go to the Manage form display page of its bundle/entity type. If tracking is enabled for that entity type, you'll see a new Menu links field in the Disabled region. Move it to the desired position to enable it and click on the Save button.
* Make sure to look over the permissions of the module. There is one permission to configure module settings and one permission to view the menu links form widget on entity edit forms.
Exerpt from module configuration page
Credits
Current maintainers:
* Patrick Fey (feyp)
* David Franke (mirroar)
The development of this project has been partly sponsored by werk21 GmbH.
Module Link
Project Usage
1123
Security Covered
Covered By Security Advisory
Version Available
Production
Module Summary
The Menu Entity Index module aims to solve the issue of displaying all menu links referencing a specific entity on the entity edit form.
Data Name
menu_entity_index