Skip to content

Tagify Icons and Tagify Iconify Icons

Both modules implement hook_tagify_autocomplete_match_alter() to turn an icon reference in the info label into an inline SVG icon. They affect the Tagify widget and the Tagify formatter.

Tagify Icons

Uses the Icon management API that Drupal core added in 11.1 (see the change record), through UI Icons and its UI Icons Field submodule.

drush en tagify_icons
  1. Add an icon field (provided by UI Icons Field) to the referenced bundle, for example field_icon on a vocabulary.
  2. On the Tagify widget or formatter, turn on Include info label.
  3. Set Info label content to the icon field's target_id token:

    [term:field_icon:target_id]
    

The module renders the icon when the info label template contains :target_id.

Tagify Iconify Icons

Uses the Iconify Icons module.

drush en tagify_iconify_icons
  1. Add an Iconify icon field to the referenced bundle.
  2. Turn on Include info label and use the field's icon token:

    [term:field_icon:icon]
    

The module renders the icon when the info label template contains :icon and the value has the form icon name (collection).