Support icon fonts in menu links

Created on 9 November 2012, over 12 years ago
Updated 21 June 2025, 3 days ago

Problem

The use of icon to add visual improvement to menus is becoming more common on the web and especially in cms's. I know this can be and has been done by contrib modules in various fashions. But it would be much easier if it was a standard part of drupal's menu systems. In particular, it would be better if a themer could implement iconic menus without doing any php coding but with with css alone. There are 2 techniques in common use:
(A) A combination of class definitions in the markup and css to define and style iconic menus.
(B) Use of the html data-* in the markup plus css to style the iconic menus.
Each method has their advantages and disadvantages. But both require some additional markup to achieve their purpose. The problem then is how the additional markup is achieved in drupal.

Proposed Solution

I propose method (B) here. By taking advantage of the existing admin menu management system, a 'data-*' attribute could be added to every menu item in drupal. A themer would have to add the appropriate css to use the attribute but would not have to write any php to use it. It offers a dynamic and flexible system for implementing iconic menus. It would also be easily 'localized'. A set of drupal 'standard' css files could be provided to establish a drupal standard 'look and feel'.

✨ Feature request
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component

menu system

Created by

πŸ‡ΊπŸ‡ΈUnited States dcrocks

Live updates comments and jobs are added and updated live.
  • stale-issue-cleanup

    To track issues in the developing policy for closing stale issues, [Policy, no patch] closing older issues

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Thank you for sharing your idea for improving Drupal.

    We are working to decide if this proposal meets the Criteria for evaluating proposed changes. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or there is no community support. Your thoughts on this will allow a decision to be made.

    Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Thanks!

  • πŸ‡©πŸ‡ͺGermany yannickoo Berlin

    In case that people are still interested in seeing how to solve this nowadays: You can use the combination of Menu Item Extras β†’ and UI Icons to get this working πŸ’ͺ

Production build 0.71.5 2024