I added a new slideshow using views slideshow and it looks good. quick question, the oimages in the slideshow do not have a hyperlink. how can I add a hyperlink to the images, and preferably a custom url per image??

Comments

aaron’s picture

Status: Active » Fixed

if you are using imagefield, you will have an option in the fields dropdown of whether to use a link or not, as well as what size image to display (if combined with imagecache).

to override the links with custom url's, you'll have to theme your view field. this can get tricky: see http://drupal.org/node/42597 to get started.

if you are using teasers, it might be easier, depending on your situation (although it could actually be harder). you'd have to theme node-type.tpl.php to get your links in there. see http://drupal.org/node/17565 -- you'd have to override print $content; with your custom code, for instance

  print l($field[0]['view'], 'custom_url', array(), NULL, NULL, FALSE, TRUE); 

would print the image as a link to custom_url.

good luck,
aaron

aaron’s picture

if you're using teasers, look at the contemplate module too. it's good for people learning how to theme.

in general, i try to use list views (of fields) when possible, as it will usually cut down on the queries used for a view. use the views wizard as a jumping point for overriding themes until you get your feet wet.

aaron

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

Daniel Norton’s picture

It's not elegant, but I have path_redirect installed and I simply created a URL redirect from the node/x page to the page I want it to bring up.