This module adds a formatter for link fields that allows you to display the current entity using a different view mode within the link. This is useful for scenarios like menu items where you might want to show an icon or other specific content alongside the link text. It provides a way to reuse display modes for link fields without additional dependencies.
Features
Adds a formatter for link fields that displays the current entity with another view mode inside the link.
It can be configured to display the rendered fields as inline (CSS: display: inline)
Use case
It was developed to be used with Menu item content fields
to show an icon along the menu item.
Notes
The formatter doesn't control when you select the same display mode that you are configuring
but it does have protection for recursive rendering just like the entity reference formatter from core.
Similar modules
Field group link can achieve similar results
but this module allows to organize the display in different view modes so you can repeat fields
and reuse display modes all implememented as a formatter with no extra dependencies.
Contributions
Patches on drupal.org are accepted but merge requests on
gitlab are preferred.