Rewrite link field in views I'm trying to rewrite the output of a link field in a view in Drupal 8, to include a font-awesome icon, I have tried overriding my view field template in twig, but all i'm getting in the twig template is {{ output }}, which contains a rendered link already.

Desired output

&lt;a href="http://www.facebook.com/profile"&gt;&lt;i class="fa fa-facebook"&gt;&lt;/i&gt;&lt;/a&gt;


Current output

&lt;a href="http://www.facebook.com/profile"&gt;http://www.facebook.com/profile&lt;/a&gt;
Have you tried doing this through the Views UI? You can use the Rewrite results as per the image below. In the rewrite output you should be able to add your font-awesome div.
You might need to use the output this field as a link option to make it clickable (you can use the replacement token of your link field) but that dependends on the field, so I am not sure if it is required.


Source: https://www.drupal.org/node/1578524