Drupal is a registered trademark of Dries Buytaert
Release: Entity API 8.x-1.8 Minor update available for module entity (8.x-1.8). Release: Module Filter 6.0.0 Major update available for module module_filter (6.0.0). Release: Blazy 3.0.19 Minor update available for module blazy (3.0.19). Release: Slick Carousel 3.0.8 Minor update available for module slick (3.0.8). Release: Blazy 3.0.18 Minor update available for module blazy (3.0.18). Release: Extra Paragraph Types (EPT): Core 2.0.1 Minor update available for module ept_core (2.0.1). Release: AI (Artificial Intelligence) 1.5.0-rc2 New release candidate for module ai (1.5.0-rc2). Release: SDC Components 1.0.10 Minor update available for module sdc_components (1.0.10). Module Revived: Content Moderation Notifications 8.x-3.9 Module content_moderation_notifications updated after 10 months of inactivity (8... Usage Milestone: Account field split Module account_field_split crossed 10,000 active installs.

Link class module provide a new widget form for field type Link. This widget allows editor to add class to fields Link attached to their content.

Requirements

As this module provide a widget for Link field included in core, this module is useful only if Link module is enabled.

Features

The widget settings permit users to add a class on content field type link with several methods

  • Set manually class (the initial behavior) on the edit form
  • Choose class from a select list
  • Force the class automatically added on the link

See screenshot.

Configuration

- Select the widget "Link with class" in the Manage form display page settings for the Link field you set on the entity.
- Configure the behavior in the widget settings
- You can set default values for classes added to the link in the field settings, after selecting the widget "Link with class"
- Editors can now add their own classes to the link field.
- Classes added must be separated with a space.

Similar modules

Link attributes widget : this module allows to add more attributes on Link field, and to specify attributes on Menu content link. You should consider using this new module.

Link attributes widget is more oriented for site builder profile, where as link class is more oriented end users (a site builder can configure which classes will be available for end users / editors)

This core issue #2477155: Update LinkWidget to accommodate the attribute. could deprecated this module.

See screenshots illustrating configuration and usage.

Activity

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

Releases

Version Type Core Release date
2.2.0 Stable Mar 4, 2025