Create new display format for a node file field
Posted by hamu | On Saturday, 9 August 2014
English
Need: I have a content type with a File field. When this field is displayed, I want it to show only icon without any text.
The current formats are either "Generic file" (icon + file name), "Table of files" (icon + file name + size) and "URL to file" (the entire file's URL).
I want to add a format "File icon", that will display an icon that utilizes as a link to the file.
What I did:
I created a very simple module called "File icon". I placed the file_icon directory in sites\default\modules
Found a related article
files:
| Attachment | Size |
|---|---|
| 176 bytes | |
| 1.83 KB |