phpdrupalcckubercart

Drupal: add a link to a image free cck field & re-indent


I am working on theming the product page for drupal ubercart and can't seem to get the image to be a link also. This is what I have so far:

<?php  
if ($node->field_image_cache[0]['filepath']):
    print theme('imagecache', 'uc_thumbmail', $node->field_image_cache[0]['filepath']); 
endif;
?>  

The link has to link to the full image which is product_full opposed to uc_thumbnail and I'm trying to make it into a light box also but I will be happy to even get the link to work.


Solution

  • try

    <a href=""><?php print theme_imagefield_image($node->field_image[0]); ?></a>
    

    not sure if that is what you want but it should print a link from cck