Forums / Setup & design / Image preview in media tab

Image preview in media tab

Author Message

Pascal France

Thursday 08 November 2007 3:04:17 am

Hi,

When we create an Image object in the media tab, we can preview it selecting the "thumbnail" option in the "Sub items" frame.

But this preview doesn't work anymore if we use another Image classe (e.g: a copy of the default Image classe).

Is there a way that such a thing works whith a custom Image class ?

Pascal

PS: here is my custom Image class:

Name: Icônes listes articles
Identifier: icone_liste_article

Attributes:

Text line:
Name: Nom
ID: nom

Block XML:
Name: Caption
ID: caption

Image:
Name: Image
ID: image

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

Gunnar Birkeland

Thursday 08 November 2007 5:35:52 am

Hi Pascal

Have you tried to use the same .tpl override for the new class as for objects of image?

In short, find out which templates are used for listing the thumbnails and use the same/copy the templates for icone_liste_article. Turn on Debug Output -> Show Used templates.

Not sure, but this may work in your example:

(override.ini for your admin siteaccess)

[thumbnail_icone_liste_article]
Source=node/view/thumbnail.tpl
MatchFile=thumbnail/image.tpl
Subdir=templates
Match[class_identifier]=icone_liste_article

GL

</major>
----------------------------
ez-version: 3.9.3.
PHP: 4.4.2-1
MYSQL: 4.0.24

Pascal France

Thursday 08 November 2007 12:40:06 pm

Hi Gunnar,

You are absolutely right. Of course !
Think a lot.

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