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 text and tokens, evaluated for each referenced entity.
Enable it¶
- Open the widget settings of a field using the Tagify widget, under
/admin/structure/types/manage/<content-type>/form-display. - Turn on Include info label.
- In Value to show, choose what the tag shows. The list has the fields of the referenced bundles, the entity properties (name, ID, bundle, parent, author, language) and the dates. A date asks for a Date format, an image for an Image style.
- Save.
To combine values, or to use a token that is not in the list, choose Custom
text or tokens at the end of Value to show. The Info label content
field and the token browser then show up, for text and tokens such as
ISO: [term:field_iso].
The fields of the referenced entity are only listed with the Token module enabled, which provides their tokens. Without it, the list shows the properties and dates from core.
Icons and images go alone
An icon or an image only shows when it is the whole info label. The
settings form rejects an icon or an image from the list, such as
[term:field_flag:target_id], combined with other text or tokens. A
token typed by hand is not checked: if it returns an image URL, keep it
alone too, or the tag shows the URL as text.
The Tagify formatter has the same settings for display. It does not offer email addresses, as visitors see its output.
Images¶
When the evaluated value is an image URL (jpg, jpeg, png, gif, bmp,
svg, webp, or avif), 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 |
|---|---|
[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.