Skip to content

Info label

The info label shows extra information inside each tag, next to the entity label: a vocabulary name, an author, a date, an image, or an icon. Its value comes from a token template evaluated for each referenced entity.

Enable it

  1. Open the widget settings of a field using the Tagify widget, under /admin/structure/types/manage/<content-type>/form-display.
  2. Turn on Include info label.
  3. Fill Info label content with text and tokens. With the Token module enabled, a Browse available tokens link opens the token browser.
  4. Save.

The Tagify formatter has the same two settings for display.

Images

When the evaluated value is an image URL (jpg, jpeg, png, gif, bmp, svg, or webp), the tag shows the image instead of the text. A taxonomy vocabulary with a media field holding an icon can show that icon in each tag:

[term:field_media_icon:entity:field_media_image:thumbnail:url]

For icons from the core Icon API or the Iconify Icons module, see Tagify Icons.

Token examples

Tokens marked with a star render an image or an icon.

Taxonomy term

Value Token
Term hierarchy [term:parents:join: ↘ ]
Media image ★ [term:field_media_icon:entity:field_media_image:thumbnail:url]
File image ★ [term:field_flag:thumbnail:url]
Icon ★ [term:field_flag:target_id] (needs Tagify Icons)
Iconify icon ★ [term:field_icon:icon] (needs Tagify Iconify Icons)
Vocabulary name [term:vocabulary]
Parent [term:parent]
Language [term:language:name]
Term ID [term:tid]

Node

Value Token
Media image ★ [node:field_media_icon:entity:field_media_image:thumbnail:url]
File image ★ [node:field_flag:thumbnail:url]
Icon ★ [node:field_flag:target_id] (needs Tagify Icons)
Iconify icon ★ [node:field_icon:icon] (needs Tagify Iconify Icons)
Author [node:author:account-name]
Author roles [node:author:roles:join:, ]
Node ID [node:nid]
Content type [node:content-type:name]
Created / changed [node:created], [node:changed]

User

Value Token
Email [user:mail]
Picture ★ [user:user_picture:thumbnail:url]
Roles [user:roles:join:, ]
User ID [user:uid]

Field names such as field_media_icon, field_flag, and field_icon are examples; replace them with the fields on your bundles.

Private data

On display, tokens are replaced only for visitors who can view the referenced entity, and the values are shown without field access checks. Avoid tokens with private data, such as [user:mail], in the formatter.