Menu Link Attributes

Component ID

2578907

Component name

Menu Link Attributes

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

72210

Component created

Component changed

Component body

This module allows you to add attributes to your menu links or their wrapping <li> elements.

Installation ☝️

  1. Enable Menu Link Attributes module
  2. Grant Use menu link attributes permission to users which should be able to set attributes on menu items
  3. Set available attributes on /admin/config/menu_link_attributes/config

Screencasts 📺

Container attributes

In order to provide attributes for containers (wrapping <li> elements) you simply need to create a new attribute starting with container_, those will be applied on the container automatically.

Optional dependency

  • YAML Editor - Loads an Ace editor which makes YAML editing more fun

Contributing 🔨

You can create issues and pull requests on Github.


Let's see if we can merge this module into Menu Attributes – #2174435: Port Menu attributes to Drupal 8