I have a file upload field which's format is set to generic file. It prints the following markup:
<div class="content">
<span class="file">
<img class="file-icon" alt="" title="application/msword" src="project/modules/file/icons/x-office-document.png">
<a href="urltofile.doc" type="application/msword; length=22016" title="file.doc">Lorem ipsum</a>
</span>
<span class="file">
...
</span>
</div>
But I'd rather not show the img at all, alter url text, something similar like this:
<div class="content">
<span class="file maybe-some-custom-classes">
<a href="urltofile.doc">$filename</a>
<span>$description text of this field</span>
</span>
</div>
What hooks would I have to use for this? And why is this so hard to find on the docs?!
field--type.tpl.php
, probablyfield--file.tpl.php
for a file field