dongsui8162 2011-02-21 19:43
浏览 11
已采纳

Drupal:添加图像免费cck字段的链接并重新缩进

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.

  • 写回答

2条回答 默认 最新

  • dousha7904 2011-02-22 16:00
    关注

    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

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?