custom related objects

Author Message

Pascal France

Thursday 13 July 2006 10:31:07 am

Hi,

When we use the "Related objects" field which is displayed at the bottom of the object edit page, we can upload files which are on our hard disk.

If I uploload a mp3 or ogg file, I can see it in "Media library/file/"
Once uploaded, I can see my file in the "Related objects" field as "audio/mpeg" file type.
To display the related objects, I use this code:

{def $related=fetch('content', 'related_objects', hash( 'object_id', $node.object.id, 'all_relations', false())) }
{section loop=$related var=myloop}
    {$myloop.item.data_map.file.content.original_filename}<br />
{/section}

which display .swf, .pdf file names and so on. But it doesn't display .mp3, .ogg files
(to display image names, I change .file. to .image. )

I think I have to set up an .ini file but I don't know which ?

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

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 18 2025 22:21:34
Script start
Timing: Jan 18 2025 22:21:34
Module start 'layout'
Timing: Jan 18 2025 22:21:34
Module start 'content'
Timing: Jan 18 2025 22:21:34
Module end 'content'
Timing: Jan 18 2025 22:21:34
Script end

Main resources:

Total runtime0.5974 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 587.9063152.6250
Module start 'layout' 0.00560.0027 740.531339.4453
Module start 'content' 0.00830.5881 779.9766430.8828
Module end 'content' 0.59640.0010 1,210.85948.3281
Script end 0.5974  1,219.1875 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.5586160.0002
Check MTime0.00150.2473160.0001
Mysql Total
Database connection0.00080.141310.0008
Mysqli_queries0.563394.2903460.0122
Looping result0.00030.0572440.0000
Template Total0.569695.320.2848
Template load0.00200.340120.0010
Template processing0.567695.005620.2838
Template load and register function0.00010.019110.0001
states
state_id_array0.00090.154810.0009
state_identifier_array0.00070.110320.0003
Override
Cache load0.00170.2846130.0001
Sytem overhead
Fetch class attribute can translate value0.00050.080210.0005
Fetch class attribute name0.00050.076010.0005
XML
Image XML parsing0.00010.017610.0001
class_abstraction
Instantiating content class attribute0.00000.000510.0000
General
dbfile0.00050.0864100.0001
String conversion0.00000.001240.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
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 9
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs