Allow field value to be used as the URL part of a link

Created on 21 June 2023, over 1 year ago
Updated 26 June 2023, over 1 year ago

Problem/Motivation

This module currently allows the field value to be the label of a link to the given entity.

It would be nice to allow the value to be the URL portion of a link. The use-case is, for instance, to be able to easily generate links to paths such as /node/[node:nid]/foobar, where that url is handled by a view, or other controller that is aware of the dynamic node ID.

Proposed resolution

Add a link text setting to the field formatter. This would take precedence over the current boolean link option (but could go the other way too.)

User interface changes

A new text field in the formatter settings form.

✨ Feature request
Status

Needs review

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jhedstrom Portland, OR

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @jhedstrom
  • Status changed to Needs review over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States jhedstrom Portland, OR

    This PR (and attached patch for use with composer) adds this option to the field formatter. The UI might be confusing, so we could perhaps use the form states api to hide or show the options as needed...

  • πŸ‡³πŸ‡ΏNew Zealand haydent

    Thanks jedstrom, I think this is a good idea. Wasn't a use case originally but it makes sense. Once I have some time I will see if I can try and clean up the UI a little bit and get it in there.

    Thanks again for the suggestion.

Production build 0.71.5 2024