Forums / Setup & design / custom related objects

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