
In the Uploads module's Summary template, I would like to place a pdf image if the file is a pdf, and a Word doc image if the file is a doc, etc. I know how to do that once I get the extension. The problem I'm having is... How do I get the extension? I know that somehow, I can use this code to get it:
Code: Select all
$extension = strtolower (strrchr ($entry->name, "."));
But how do I use that code in my template so that I'll have use of the $extension variable? I tried making a user defined tag with that code, but that didn't work. So I imagine I probably need some other smarty syntax that I can't seem to find.