June 13th, 2013, 04:42 PM
PHP image link (newbie)
In the red box here the "download" image and the link are rendered one after the other like this:
Can anyone please tell me can I put the link inside the image so only the image displays but it is clickable ie which in html would be
$image = "/download.jpg";
echo '<img src="'.$image.'">';
<?php print render($items); ?>
<a href="http://www.example.com/file.mp3"><img src="example.jpg"></a>
June 13th, 2013, 05:15 PM
render() is apparently the thing that outputs the entire link so you'll have to modify that. If you're not sure how we'll need to see its code.
June 13th, 2013, 05:32 PM
OK thanks - it is Drupal 7 (render mentioned here and I am not sure where the relevant code is. If anyone knows Drupal please direct me to the relevant file or it is only a sandpit server so I could give you the SSH login
Originally Posted by requinix
I thought it might be general PHP territory but if it is Drupal territory then maybe I should ask on a Drupal forum.