1

I am wondering what is the best way to replace each of the internal links, e.g. 'Bookmark this' etc., with images?

1

Not really a Drupal specific question, but use CSS image replacement. I personally use the Phark revisited method, because you don't need any additional markup and you use only three or four rules to make it work (in some cases you don't need to use width).

0

As ipwa said you can use css to replace links with images, though it's not dynamic, but this a good way if you dont need to update the images from time to time.

Ex:

.links {
  text-indent: -10000px;
  background: url('../images/file.png') no-repeat center center transparent;
  height: ; //Specify the height
  width: ; //Specify the width
}

Or you can do this also in Drupal-way via template.php preprocess. Example in node...

pseudo-code:

"<a href='#'>". theme('imagecache', 'yourPreset') ."</a>"

Or you can also use Jquery.

1
  • Thanks but I need to assing different image to each link. Your solution seems to replace all links with a single image?
    – alfish
    Jun 7 '12 at 15:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.