attachment icons?

Mutt

Well-known member
how do I set different icons for each attachment type? right now it's either a thumb of the image or the generic icon. i'd like zip files to have different icons than mp3s. thanks
 
You can edit this template:

Admin CP -> Appearance -> Templates -> attached_files

You can use a condition structure like this to conditionally insert HTML based on the file extension:

Code:
<xen:if is="{$attachment.extension} == 'zip'">
	...
<xen:elseif is="{$attachment.extension} == 'mp3'" />
	...
<xen:elseif is="{$attachment.extension} == 'jpg'" />
	...
</xen:if>

This would be inside of the foreach loop in that template.
 
thanks bruce. I knew I could code it like that. just assumed there was something built-in that I was missing. if I'm going to do that, could probably just drop the extension into the icon name & loose the whole if else thing. when I do it, I'll post it. :) thanks again
 
Top Bottom