Custom template for content type, How to print a link field as a hyperlinked image I am making a site for a music festival. I have one content type for attending artists, which includes the following fields of the fields type Link: soundcloud, youtube etc.

I would like to print these fields with an image (small icons) instead of the written link.

How can I do that?

( The path I am looking at for the moment: copy node.tpl.php, rename to node--artist.tpl.php, add some code, put in sites/all/themes/default_theme. )
It's easier and more practical apply a preproccess hook:

Function YOUR_THEME_proprocces_node__artist(&amp;$vars){

 // $vars contain the fields to be renderable in content attribute

}


I resolved a similar question a few days ago: change links read more and add comment

Inside of array tree $vars['content], you will have to change the title attribute adding the html mark you want.

If you have a problem to find the tree or change the array, print the array with the dpm($vars) in your code and capture an screenshot to publish here.