Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I developed this patch for a client. This client uses link fields within his content types (unlimited). But instead of having a simple list of links he wanted to be able to add text before or after each link. However, these text parts should not be clickable.
So, instead of
it should i.e. be something like this
The following patch provides the user with the ability to enter such texts. If you find this useful, please try it and let me know if you find any issues.
Cheers
Paul
Comment | File | Size | Author |
---|---|---|---|
#4 | link_prefix-suffix-4.patch | 24.3 KB | broon |
#2 | link_w_prefix_suffix.png | 68.26 KB | broon |
link_prefix-suffix.patch | 18.62 KB | broon | |
Comments
Comment #2
broonThanks for the plus one, I already wondered whether or not anybody finds this useful. We have been using this patch (with numerous updates due to link module updates) for almost four years now on several websites without any issues. Best example/demo would be our institute's website: https://www.ecologic.eu (or see the attached screenshot).
In many cases, we only use the prefix field to describe the content type the links leads to, but there have been a lot of other instances these additional fields were helpful.
Comment #3
kari.kaariainen CreditAttribution: kari.kaariainen commentedDefinitely useful. Which version is the patch for?
Comment #4
broonThe original patch was written for 7.x-1.0, there have been some changes in the meantime.
I just diffed our currently used version against a fresh 7.x-1.4 module installation, but this is only tested minimally, please use with care.
Comment #6
broonFor Drupal 8+: https://www.drupal.org/project/link_context
Comment #7
DamienMcKennaPlease don't close issues. Thank you.