Create a field formatter

Created on 6 March 2020, over 4 years ago
Updated 13 October 2023, 9 months ago

Is very handy to have a field formatter that renders a link with the file redirect url, like Media Entity Download β†’ does.

✨ Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain vidorado Pamplona (Navarra)

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States mlncn Minneapolis, MN, USA

    This looks goodβ€” could use some options, in particular to provide a URL-only option in the download link formatter.

    Having the/a formatter able to provide only a URL is very helpful for easily handling the presentation of the link in a Twig template (custom text, using another field on the media item as part of the link text, adding classes to the anchor tag, etc).

    Drupal core's Link field formatter provides this option with two settings:

    • URL only
    • Show URL as plain text

    Media Entity File Redirect could follow the same approach.

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    +1 on this as I think this is a very good and expected way to configure the functionality on the entity display level!

Production build 0.69.0 2024