menu_markup

menu_markup is a module for Drupal 8 that enables you to use HTML markup in menu titles. By default, Drupal 8 will not accept HTML markup as part of a menu title. This module allows you to configure markup to be shown along with specific menu titles (including submenu items). This can be very handy if you want to show a glyphicon from Bootstrap or an icon from FontAwesome, etc. in front of your menu titles. This version of the module only works with the v8.x releases of Drupal.

Requirements

This version of the module only works with the v8.0.x releases of Drupal.

Standard usage scenario

1. Download and install the module.
2. Open up the edit page for a menu link
3. Expand the Menu Markup section to see the options
4. Enter in your link markup
5. A special token @title can be used to substitute in the translated original title text
6. If you select a node type count, another special token called @nodeCount will be available representing the total count of published nodes of the selected type (useful for Bootstrap badges in menu items)

Demo Site

You can see a demo of this in action on the Incursus web site.

Example Link Markup

<span class="fa fa-home"></span>&nbsp;&nbsp;@title

 

<span class="fa fa-star"></span>&nbsp;&nbsp;<strong>@title</strong> <span class="badge">@nodeCount</span>

Screenshots