Download & Extend

File Entity Link

Adds an option to link file to entity

Out of the box, the Media and File Entity modules attach media to entities using Fields but they provide no way to then display media in those fields as links to the parent entity. A common use-case for this would be a teaser view of a node showing an image linked to the node.

This very simple module adds an option to the "File Types" view mode settings to accomplish this (at admin/config/media/file-types/manage/image/file-display for images).

A couple notes:

  • This module has only been tested with the fields of type "file". I know it will not work with fields of type "multimedia asset". I haven't tested it with "image" fields.
  • Links are placed around only the file portion of the file entity. If you've added fields (like caption, etc) to your entity they will not be linked. This was preferable for my application and informed the architecture of this module.
  • Any type of file can be linked, you're not limited to just applying links to images. Of course, it's possible some file types will output markup that will not acquit itself well to being wrapped in a link

Sponsored by Forum One Communications

Downloads

Version Downloads Date Links
7.x-1.0-alpha2 tar.gz (7.88 KB) | zip (8.58 KB) 2011-Nov-09 Notes

Project Information


Maintainers for File Entity Link

  • azinck - 2 commits
    last: 28 weeks ago, first: 28 weeks ago

Issues for File Entity Link

To avoid duplicates, please search before submitting a new issue.
All issues
Bug reports