Link field: add the ability to have a static anchor text and link title

Created on 1 November 2012, almost 13 years ago
Updated 9 May 2023, over 2 years ago

Using the link field from the contrib module, you can add a static "anchor text" and "link title", so that the user that fills in the field must enter only the URL. In my websites, I use very very much this feature. Unfortunately, it went lost moving link to core.

And, of course, it would be nice if these static texts could have support for tokens...

Example use-cases:

  • A website that needs to store the link of an IOS or Mac OSX application in the App Store would need this feature to assign the "See [appname] in the App Store" (where [appname] is a token) to the anchor text of a link field without having the risk of publishers changing the exposed default value;
  • You might want to set the anchor text of a link to the value of another field of your content type, but for some reason you need the value either as a field value and the anchor text;

In these two use-cases, you would need a static "link title" too if you want to enhance these links' accessibility.

Feature request
Status

Active

Version

10.1

Component
Link 

Last updated about 12 hours ago

Created by

🇮🇹Italy falcon03

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 alphex Atlanta, GA USA

    Bump this.

  • Status changed to Closed: won't fix 19 days ago
  • 🇺🇸United States dcam

    Thank you for your suggestion to improve Drupal Core! I'm going to close this issue on the basis that there wasn't a lot of support for the idea over the last 12 years and that there's a contrib module that does what is asked. If anyone needs this functionality, then I suggest you download and install the fixed_text_link_formatter contrib module. I'm not certain that it supports tokens, but it could probably be updated to do that.

Production build 0.71.5 2024