Drupal 5.7, rListings module, Node Images module, Thickbox module, CleanURLs (currently turned off because it breaks image links).
I am having trouble making a thumbnail image into a link which leads to the node that the image is attached to. there is a text link which works;
$listing_link = l($listing_array['city_name'],"node/$node_id");
but i would like the text replaced with an image. I have tried the code below but it does not work.
$image_link = l(<img src=\"image.gif\">,"node/$node_id");
Any suggestions?

Comments

joshua.howell’s picture

Status: Active » Closed (fixed)

I finally got it working, the code i used was;

$image = '<img src="'.$listing_array['thumbpath'].'" class="featureimage">';
$link = l($image, "node/$node_id", array(), NULL, NULL, FALSE, TRUE);

hope this helps if anyone comes across the same issue.