Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Edit image file name on lightbox View modes: 
User avatar
Member
Member
Leandro Brito - 11/9/2011 10:18:21 AM
   
Edit image file name on lightbox
Hi,

I have a image gallery (attachment image gallery) inside my News.
The lightbox show the name of file on description, below the image.

Ex.:

image (file)
celphone.jpg
image 4 of 14


How can I remove the .jpg extension of image name? I searched on transformation but didn't find this.

Thanks
Leandro

User avatar
Kentico Support
Kentico Support
janh-kentico - 11/10/2011 3:08:45 AM
   
RE:Edit image file name on lightbox
Hi Leandro,

This can be done by editing the lightbox javascript, which is located in the ~\CMSScripts\lightbox directory, so please open the lightbox.js file, go through its source code until you find the updateDetails: function(). This is the place, where this javascript creates a caption for the image, so here you can remove that extension:

// if caption is not null
if (imageArray[activeImage][1]) {
Element.show('caption');
Element.setInnerHTML('caption', imageArray[activeImage][1].substring(0, imageArray[activeImage][1].lastIndexOf('.')));
}
else {
Element.show('caption');
Element.setInnerHTML('caption', '&nbsp');
}

Best regards,
Jan Hermann

User avatar
Member
Member
Leandro Brito - 11/10/2011 12:12:32 PM
   
RE:Edit image file name on lightbox
Thanks Jan!

Best regards,
Leandro