You are here

README.txt in Image link to file 7

-- SUMMARY --

The Image link to file module is a formatter for image fields that creates a
hyperlink from the image to a file field in the same entity.

This simple module solves a typical use case in which, when clicking on a
preview image (e.g. JPG or PNG file), a PDF file specified as a file field in
the same node should be opened.

To use the formatter, click on the Manage Display tab of a content type that
contains at least an image field and a file field. Then, in the Format column
of the image field, select "Image linked to file". To specify the format
settings, click on the button with the gear to reveal the "Image style"
selector, the "Image link" selector and the "Open image in a new window or tab"
checkbox.

Any of the available image style options can be selected for the image and any
of the file fields can be selected for the linked file. Optionally, the linked
file can be made to open in a new window or tab, rather than in the same window
or tab.

After your selection, click the Update button and then click the Save button.


-- REQUIREMENTS --

None.


-- INSTALLATION --

* Install as usual, see
  https://drupal.org/documentation/install/modules-themes/modules-7
  for further information.


-- CONFIGURATION --

None.


-- FAQ --

Q: Must a file link be specified in any case? What happens if no link is
   specified?

A: A link to a file field is optional. If no link is specified, the image will
   not be linked to anything.


Q: What happens if the file field linked to the image is empty?

A: If the file field linked to the image is empty, the image will not be linked
   to anything.


Q: What if there is more than one file field in the node?

A: A selector in the settings form (accessible via the button with the gear)
   allows you to specify as link destination any of the file field in the node.


Q: What if there are multiple file values in the same file field specified as
   link destination?

A: The first file is linked to the image.


Q: Can I control whether the linked file opens in a new window or in a new tab?

A: This depends on the settings of your browser. This module can control
   whether the file opens in the same window/tab or in a new window/tab, but
   has no control over the choice of window vs. tab.


-- CONTACT --

Developer and current maintainer:
* Alex B - https://drupal.org/user/1815724

File

README.txt
View source
  1. -- SUMMARY --
  2. The Image link to file module is a formatter for image fields that creates a
  3. hyperlink from the image to a file field in the same entity.
  4. This simple module solves a typical use case in which, when clicking on a
  5. preview image (e.g. JPG or PNG file), a PDF file specified as a file field in
  6. the same node should be opened.
  7. To use the formatter, click on the Manage Display tab of a content type that
  8. contains at least an image field and a file field. Then, in the Format column
  9. of the image field, select "Image linked to file". To specify the format
  10. settings, click on the button with the gear to reveal the "Image style"
  11. selector, the "Image link" selector and the "Open image in a new window or tab"
  12. checkbox.
  13. Any of the available image style options can be selected for the image and any
  14. of the file fields can be selected for the linked file. Optionally, the linked
  15. file can be made to open in a new window or tab, rather than in the same window
  16. or tab.
  17. After your selection, click the Update button and then click the Save button.
  18. -- REQUIREMENTS --
  19. None.
  20. -- INSTALLATION --
  21. * Install as usual, see
  22. https://drupal.org/documentation/install/modules-themes/modules-7
  23. for further information.
  24. -- CONFIGURATION --
  25. None.
  26. -- FAQ --
  27. Q: Must a file link be specified in any case? What happens if no link is
  28. specified?
  29. A: A link to a file field is optional. If no link is specified, the image will
  30. not be linked to anything.
  31. Q: What happens if the file field linked to the image is empty?
  32. A: If the file field linked to the image is empty, the image will not be linked
  33. to anything.
  34. Q: What if there is more than one file field in the node?
  35. A: A selector in the settings form (accessible via the button with the gear)
  36. allows you to specify as link destination any of the file field in the node.
  37. Q: What if there are multiple file values in the same file field specified as
  38. link destination?
  39. A: The first file is linked to the image.
  40. Q: Can I control whether the linked file opens in a new window or in a new tab?
  41. A: This depends on the settings of your browser. This module can control
  42. whether the file opens in the same window/tab or in a new window/tab, but
  43. has no control over the choice of window vs. tab.
  44. -- CONTACT --
  45. Developer and current maintainer:
  46. * Alex B - https://drupal.org/user/1815724