views:

180

answers:

1

I have a Drupal 5 website on which I want to display a list (or grid) of affiliate links to different products, sales and offers. Each 'affiliate product' node will have a title, description, an image and a URL. When either the image or URL link is clicked, the user should be redirected to the URL.

I've gotten close to this, using a view, custom pager and adding a custom image field to my node in CCK (Content Construction Kit), but whenever the image is clicked, it goes to the full node page rather than the URL.

Any advice from people who've done this or something similar would be greatly appreciated. If this can be more easily achieved in Drupal 6, I'm prepared to upgrade the site, as that was on the to-do list anyway.

Thanks in advance.

A: 

If you want to stick with Drupal 5 you can use a View template in your theme (using the Theme Wizard module as a starting point) to explicitly create an image link to the URL link. That would easily be the quickest solution.

If you upgrade to Drupal 6 you can use the new features in Views 2 to re-write the image field output to include the link. There are a lot of differences between Views and Imagefield between Drupal 5 and 6 though so be ready for a slight learning curve if you go that route.

Chromix
Thanks for your response. This sounds like what I need, but how would I create the image link to the URL link in Drupal 5?
Jaymie

related questions