Link class
Categories
Component ID
Component name
Component type
Maintenance status
Development status
Component security advisory coverage
Downloads
Component created
Component changed
Component body
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.
Link class 8.x-1.2 requires Drupal >= 8.1.8
Features
The widget settings permit users to add a class on content field type link with several methods (New in 8.x-1.2 version)
- 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.
This core issue #2477155: Update LinkWidget to accommodate the attribute. could deprecated this module.
See screenshots illustrating configuration and usage.
