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
- Add an icon field (provided by UI Icons Field) to the referenced bundle,
for example
field_iconon a vocabulary. - On the Tagify widget or formatter, turn on Include info label.
-
Set Info label content to the icon field's
target_idtoken:[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
- Add an Iconify icon field to the referenced bundle.
-
Turn on Include info label and use the field's
icontoken:[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).