Hi,

I'm trying to use this snippet I found in here to display a random thumbnail image from a specific gallery. I works fine, however I would like the thumbnail to link to that specific gallery overview page.
What do I need to add to the code to make this happen?

$count = 1; /* CHANGE THIS: how many images you want? */
$tid = 42; /* CHANGE THIS: put in the valid "tid" of the image gallery */
$nodes = image_get_random($count, $tid);
foreach ($nodes as $node) {
  print image_display($node, 'thumbnail');
}

Thanks,

Mikkel

Comments

Lostmonkey’s picture

Anyone?

Street-1’s picture

I am trying to do this on a site too. Keep hitting a brick wall though. Anyone with some thoughts?

Spoke a moment too soon. Found the solution at:

http://drupal.org/node/64801