Quantcast
Viewing all articles
Browse latest Browse all 293617

File formatter render absolute url to file

Problem/Motivation

Currently, file and image field's field formatter doesn't have support to render/display absolute URL.
ImageUrlFormatter and UrlPlainFormatter classes doesn't have flexibility to display absolute url.

Steps to reproduce

Configure the field formatter and check that we don't have flexibility to render absolute url.

Proposed resolution

- Add an option to both the field formatters.
- Validate option value in viewElements() method and display URL accordingly.
- Add test cases to validate newly added options.

Remaining tasks

Contact Usability for wording of new text in the UI.
- Review MR https://git.drupalcode.org/project/drupal/-/merge_requests/5882 which represents further changes since patch #122

User interface changes

- New option is added on both the field formatters.

File field:

Image may be NSFW.
Clik here to view.

Image may be NSFW.
Clik here to view.

Image field

Image may be NSFW.
Clik here to view.

API changes

- N/A

Data model changes

- N/A

Release notes snippet


Viewing all articles
Browse latest Browse all 293617

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>