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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 06:26:26
Script start
Timing: Jan 31 2025 06:26:26
Module start 'layout'
Timing: Jan 31 2025 06:26:26
Module start 'content'
Timing: Jan 31 2025 06:26:27
Module end 'content'
Timing: Jan 31 2025 06:26:27
Script end

Main resources:

Total runtime1.0727 sec
Peak memory usage4,096.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 588.1328151.2109
Module start 'layout' 0.00520.0033 739.343836.6484
Module start 'content' 0.00841.0635 775.9922952.9375
Module end 'content' 1.07200.0007 1,728.929711.8516
Script end 1.0727  1,740.7813 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.2803160.0002
Check MTime0.00120.1123160.0001
Mysql Total
Database connection0.00070.066410.0007
Mysqli_queries1.018794.9597600.0170
Looping result0.00050.0498580.0000
Template Total1.041597.120.5208
Template load0.00220.203520.0011
Template processing1.039396.885220.5197
Template load and register function0.00140.126210.0014
states
state_id_array0.00140.127210.0014
state_identifier_array0.00170.159320.0009
Override
Cache load0.00180.1702220.0001
Sytem overhead
Fetch class attribute can translate value0.00050.046920.0003
Fetch class attribute name0.00210.199260.0004
XML
Image XML parsing0.00210.194320.0010
class_abstraction
Instantiating content class attribute0.00000.001480.0000
General
dbfile0.00230.2146240.0001
String conversion0.00000.000840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 20
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs