Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Text Link

No security coverage
View on drupal.org

TextLink transforms any text field into a clickable link by combining field values with a customizable base URL, offering features like automatic text sanitization and customizable link text. This module is useful for creating social media links, search URLs, or connecting to external services without requiring any custom code.

TextLink transforms any text field into clickable links by combining field values with customizable base URLs. Perfect for creating profile links, search URLs, or any pattern.

Features

Basic Functionality:

  • Converts text field values into clickable links using configurable base URLs
  • Works with any string or text field type in Drupal
  • Provides a field formatter that can be applied to existing fields without structural changes

Unique Features:

  • Flexible URL Construction: Combine any base URL with field values (e.g., https://linkedin.com/in/ + field value)
  • Smart Text Sanitization: Automatically converts "John Doe" to "john-doe" for URL-friendly formats
  • Customizable Link Text: Use placeholders like @value and @sanitized to control link appearance
  • Multiple Separator Options: Choose hyphens, underscores, dots, or remove spaces entirely
  • Target Control: Option to open links in new windows with proper security attributes

When to Use This Module:

  • Social Media Integration: Link usernames to LinkedIn, Twitter, or GitHub profiles
  • Search Functionality: Create search links to external engines or internal systems
  • External Integrations: Link to third-party services, documentation, or APIs
  • Directory Listings: Connect names or IDs to external directory services
  • E-commerce: Link product codes to manufacturer websites or spec sheets

Use Cases:

  • Staff directory linking to LinkedIn profiles
  • Product catalog linking to manufacturer pages
  • Research database linking to external citations
  • Event listings linking to ticket vendors
  • Service directory linking to provider websites

Post-Installation

Getting Started:

  1. Navigate to any content type's "Manage display" page (/admin/structure/types/manage/[content-type]/display)
  2. Find a text field you want to convert to links
  3. Change the formatter dropdown from "Default" to "Configurable URL Link"
  4. Click the gear icon to configure settings

Configuration Options:

  • Base URL: The URL prefix (e.g., https://example.com/user/)
  • Link Text: Display format using @value for original text or @sanitized for cleaned text
  • Auto-sanitize: Enable to clean field values for URL usage
  • Separator: Choose how spaces are handled (hyphens, underscores, dots, or removal)
  • New Window: Control whether links open in new tabs

Example Configuration:

For a "RERA Certificate Number" field:

  • Base URL: https://maharera.maharashtra.gov.in/projects-search-result?certificate_no=
  • Link Text: View @value on Rera
  • Auto-sanitize: Disabled

Result: "P52100030521" becomes a link to https://maharera.maharashtra.gov.in/projects-search-result?certificate_no=P52100030521 displaying "View P52100030521 on Rera"

No Additional Setup Required:

The module works immediately after installation. No new content types, permissions, or complex configurations needed.

Additional Requirements

Drupal Core Requirements:

  • Drupal 10.0+ or Drupal 11.0+
  • PHP 8.1+

Core Module Dependencies:

  • Field module (included in core)
  • Link module (included in core)

No External Dependencies:

This module requires no external libraries, APIs, or third-party services. It works entirely within Drupal's field system.

Similar projects

Linked Field vs TextLink:

  • Linked Field: Linked Field allows you to link fields in the field formatter settings
  • TextLink: Automatically constructs URLs from text values using base URL patterns
  • Use TextLink when: You have consistent URL patterns and want to simplify data entry

Computed Field vs TextLink:

  • Computed Field: Requires PHP code to generate field values
  • TextLink: Provides a user-friendly interface for URL construction
  • Use TextLink when: You need URL generation without custom coding

Token vs TextLink:

  • Token: General-purpose text replacement system
  • TextLink: Specialized for URL construction with field formatters
  • Use TextLink when: You specifically need URL generation for field display

External Link vs TextLink:

  • External Link: Focuses on link validation and external URL handling
  • TextLink: Focuses on URL construction from existing text values
  • Use TextLink when: You're building URLs rather than validating existing ones

Key Differentiator: TextLink is the only module that specializes in transforming existing text field values into properly formatted URLs through an intuitive field formatter interface.

Supporting this Module

Community Contributions:

  • Report issues and feature requests on the project issue queue
  • Submit patches and improvements via merge requests
  • Help with documentation and translations

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Aug 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Core Release date
1.0.x-dev Dev 10–11 Aug 6, 2025