0

With Manage Display of image field, I set 'Link image to' to File.

enter image description here

so when user clicks the styled image, will link to original file, I want to change the html output of the link. How may I do so?

enter image description here

2
  • what do you want to change?
    – Jimajamma
    Jan 19, 2012 at 15:17
  • I would like to add custom class, id and even change the path of link.
    – gilzero
    Jan 19, 2012 at 16:03

2 Answers 2

2

The 'proper' answer to this question is: Use or make another formatter for image fields. For instance: Image URL Formatter is probably close enough for you to hack on.

If, when you're done, you feel generous... Make a sandbox project on drupal.org and share. :-)

0
2

Install the devel themer module. After enabling it you can point to whatever you want to change. It will tell you which theme method is actually called what options you have to implement your own one.

2
  • I am actually using themer module. I know theme_image handles the presentation of image. But I can't find one handles the link of image.
    – gilzero
    Jan 19, 2012 at 17:05
  • never mind, i find it. theme_image_formatter. thanks anyway.
    – gilzero
    Jan 19, 2012 at 17:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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