Module Description
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.
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.
Module Link
Project Usage
5441
Security Covered
Covered By Security Advisory
Version Available
Production
Module Summary
This module aims to solve the problem of allowing editors to add classes to Link fields attached to their content by providing a new widget form for the Link field type.
Data Name
link_class