Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Media Libraries in 5.5 and DataList View modes: 
User avatar
Member
Member
nicola.cesaroni-iseaisea - 6/5/2013 12:25:15 PM
   
Media Libraries in 5.5 and DataList
On an old project with Kentico 5.5 I have to replace a webpart "MediaGallery" with a "Datalist with custom query."
I used the same transformation (with "<cc1: MediaFilePreview ..."), but the image shown in the first case is the thumbnail, in the second the original image.
How do I show the thumbnail with the Datalist?

User avatar
Kentico Support
Kentico Support
kentico_filipl - 6/7/2013 7:44:03 AM
   
RE:Media Libraries in 5.5 and DataList
Hello Nicola,

You can define the size of an image in the particular function you will use for displaying images. You can use <%# GetImage("Image", int width, int height) %> for instance (if the image is stored in Direct uploader form control) and set the size to fit the thumbnail or some other functions depending on a form control which is used for those images.

Complete list of all available functions you can use in transformations can be found in Context Help - Methods in transformations.

Best regards,
Filip Ligac

User avatar
Member
Member
nicola.cesaroni-iseaisea - 6/7/2013 10:03:55 AM
   
RE:Media Libraries in 5.5 and DataList
Hello Filip,
thanks for the quick response.
I solved the problem by using a custom function that returns a link to the thumbnail image passing the FileID in media library