1

using the Link module, i have created a view of content fields:

  • Link
  • Title
  • Body

And i want the Title to be a clickable link to the URL of the Link field. In D7 the links field provided for a replacement pattern for the URL as raw value but in D8 that is not available. How can I make the Title field a clickable link with the Link URL?

1 Answer 1

6

The raw replacement pattern isn't available, but you can customize a new hidden field to be the replacement equivalent:

  • Add a new link field
    • Check the Exclude from display, URL only, Show URL as plain text options to have your field be available.
  • Add a new title field
    • Uncheck Link to the Content
    • Use <a href="{{ field_MY_LINK_FIELD }}">{{ title }}</a> in the rewrite options to render title field with a link to your link field URL
1
  • Thank you! I missed that URL only checkbox. This works good.
    – Yuri
    Commented Mar 30, 2019 at 9:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.