I have created user profile fields for Twitter, LinkedIn and GitHub that are just plain Link Fields.

I would like to add the relevant Font Awesome icon HTML to each of the fields so that the icon is printed instead of the URL. I would like this to happen in all instances of the field being used whether its a view or the user entity.

What preprocess function should I use? How should I add the HTML to the template using Twig?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.