Forums / Setup & design / Icons not showing up properly

Icons not showing up properly

Author Message

Frey Staso

Tuesday 15 March 2005 1:36:28 pm

Try as I may to puzzle out the icon syntax, all I can muster is a small png of "binary.png" instead of the apropriate mime icon (pdf, image, etc) what glaring mistake am I making with this?

{let mimetype=$:item.object.file} {$mimetype|mimetype_icon( normal, $mimetype.name )} {/let}

thanks!

Ɓukasz Serwatka

Wednesday 16 March 2005 11:28:04 pm

Hi,

What is the output form $mimetype?
Have you tried examples from?
http://ez.no/ez_publish/documentation/reference/template_operators/strings/mimetype_icon

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Frey Staso

Thursday 17 March 2005 10:41:13 am

I'm just giving up on this issue. I'll just work with the default template rather than trying to re-write it. Thanks for trying ;)

Frey Staso

Thursday 07 July 2005 11:11:07 am

Okay since it took me months to figure this out, if you want to display the icon for a file that you have uploaded, this is the code!!

(of course you have to replace $:node with $child or whatever if you are looping through them)

{$:node.object.data_map.file.content.mime_type|mimetype_icon(normal, $node.name )}

Good luck