[support] image gallery

garyl lists at luminosity.co.uk
Fri Jul 31 18:30:00 UTC 2009


GaryL wrote:
> I am using the image and image_gallery modules. Is there an easy way to 
> find out if an image is in a gallery from within node-image.tpl.php or 
> by changing theme_image_teaser()
> 
> I'd like to change the link so that an image link on my blog goes 
> straight to the gallery page instead of the image page
> 
> So for example on:
> http://ramblings.garylawton.com/2009_05_18/Sunny/Avon
> 
> the link from the image goes to:
> http://ramblings.garylawton.com/image/tid/63
> 
> instead of going to:
> http://ramblings.garylawton.com/node/1433
> 
> Any ideas appreciated, happy to write some sql to pull this from the 
> taxonomy if there isn't a better way....
> 
> Cheers
> Gary
> -- 
> [ Drupal support list | http://lists.drupal.org/ ]


turns out this is really simple.

load the image with:

$node=node_load()

then use:

taxonomy_node_get_terms_by_vocabulary($node, $vid)

where $vid is the vocab id of the image gallery

Gary



More information about the support mailing list