This project is not covered by Drupal’s security advisory policy.

This module provides a new field widget for Link fields that allows site administrators to define a default value for the link text (title) at the field widget level.

Features

  • Define a global default text for links (e.g., "Read more" or "Click here") that automatically populates the link text field when editors create content.
  • Extends the core Drupal Link widget, maintaining all standard functionality while adding the default value option.
  • Reduces repetitive data entry for editors by pre-filling common link labels.

When to use this module?

Use this module when you have a content type with a link field where the link text is often the same across most entries. For example, a "Related Resource" link that usually says "View Document".

Why not to use just core Link features?

Because core fails to allow to set a default link text value for links without setting a default URL value. There is a validation constraint forcing it. This is an old known core issue: Default value for link text is not saved.

Post-Installation

  1. Install the "Default Link Text Widget" module as you would any other Drupal module.
  2. Configure a Link field:
    1. Go to Structure > Content types (or your preferred entity type).
    2. Click Manage form display for the content type you want to modify.
    3. Find your Link field and change the widget to Default Link.
    4. Set the default value:
    1. Click the gear icon (Settings) next to the Default Link widget.
    2. Enter your desired text in the Default value for link text field.
    3. Click Update and then Save at the bottom of the page.
  3. Create a new piece of content. You will see that the link text field is now pre-populated with your chosen default value!
Supporting organizations: 
Supported the creation of this project.

Project information

  • caution Minimally maintained
    Maintainers monitor issues, but fast responses are not guaranteed.
  • caution Maintenance fixes only
    Considered feature-complete by its maintainers.
  • Project categories: Content editing experience
  • By shivansunfire on , updated
  • shield alertThis project is not covered by the security advisory policy.
    Use at your own risk! It may have publicly disclosed vulnerabilities.

Releases