Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
A lightweight URL field that is intended to be used as the basis for Drupal 8's URL field type in #501434: Move Link/URL field type into core. This can also easily be used to replace Drupal 6 profile URL fields.
Dependencies
None
Features
- External links only
- Optional title support
- Titles can be automatically fetched from the
<title>
value of the URL. - Widget with options to use title or URL as the link text, and trim length for long URLs or titles.
- Token replacement of the title field on display.
- API support for attributes for each URL field value (not exposed in the widget).
If you need more complex stuff like supporting internal links or targets, etc., then you can easily write more complex field widgets and formatters.
Recommended modules
- Elements module if enabled, the default URL field widget will use the HTML5 'url' FAPI element.
Similar modules
- Link field module is the established, community-supported link module. My goals for this project are to investigate a much lighter-weight field type solution for Drupal core rather than porting Link to Drupal 8. The amount of features and code that we would have to cut from the Link module to make it appropriate for core would have neutered the module, so I thought it best to investigate a simple and light field type for core, and then Link module could be free to expose more complex widget and formatters on top of the field type in core.
Supporting organizations:
Project information
- Module categories: Site Structure
- 7,148 sites report using this module
- Created by Dave Reid on , updated
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
7.x-1.0
released 26 January 2013
Works with Drupal: 7.x
✓ Recommended by the project’s maintainer.
Development version: 7.x-1.x-dev updated 9 Sep 2012 at 01:49 UTC