Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

menu_link

553 sites Security covered
View on drupal.org

Defines a menu link field type.

Drupal's core Menu module allows nodes to place menu links (linking to the node) into the menu. The Menu Link (Field) module however allows entities of any type to place menu links into the menu using a field.

Menu link as a field

Menu links as fields gives you the following benefits.

  • Field API. Menu links will be automatically available to modules that interact with the Field API (like the Views module).
  • Widgets and formatters. Use separate widgets and formatters per entity type (and bundle). Contrib modules can provide all kinds of new widgets and formatters.
  • Revision support. Menu links' properties are stored per revision (among which their location in the menu).
  • Permission control. Menu links on nodes can be added by users that don't have access to administer full menus. Permission for menu links on nodes can even be restricted per role with modules like the Field permissions module.

Menu module integration

The Menu Link (Field) module integrates seamlessly into the Menu module. The UI for node types, to configure which menus are available, isn't altered.

The "Menu settings" tab is however removed from the node form and replaced by an field widget (To put the widget into a vertical tab use the Field group module).

Now that menu links are stored as a field it is thus possible to use different widgets per node type.

Developers

Relations between menu links and entities

The Menu Link (Field) module provides one predefined field stored in a fixed database table (using field_sql_storage) named {field_data_menu_link}. Using a fixed table allows other modules to use this table to retrieve and build upon relations between menu links and entities (This field is also being used for the integration with the Menu module).

Menu API additions

To speed up saving/deleting of menu links, the Menu link provides a couple of additions to the Menu API. Those may be used by other modules.

  • menu_link_load_multiple(array $mlids, array $conditions = array())
  • menu_link_delete_multiple(array $mlids)

Plans

  • Provide an generic parent menu link selector element. Using jQuery we could improve usability. Other modules should be able to hook into it and for example restrict the available parents.

Contributors

The initial module is provided by casey.

Activity

Total releases
2
First release
Jul 2025
Latest release
8 months ago
Release cadence
0 days
Stability
100% stable

Releases

Version Type Release date
2.0.7 Stable Jul 25, 2025
2.0.6 Stable Jul 25, 2025