I am working in Kentico 6 and am having some issues trying to use the document attachments web part.
What I am trying to do is create a custom slide show out of images I have attached to the page (through the properties tab -> attachments tab). After attaching the images, I have added a document attachment web part. The path to the content is set to the current page and I am using a custom transformation (see below).
The I am using jQuery to create the slideshow which has thumbnail navigation. Instead of using separate images for the thumbnail navigation, I am resizing the original image in the transformation. In order for jQuery to pull the correct thumbnail for each image, I am storing the URL to the image attachments in a “data-“ property. The main images are being displayed, however, the thumbnail image is not being found (even though it’s the same as the original image, just resized with “?maxsidesize”). Is there something else that I can use in my transformation to get the actual physical path to use in the data- property for the thumbnail image? Right now, the url is showing as http://localhost:54075/KenticoCMS/getattachment/Events/image.jpg which jQuery is returning as undefined.
Here is the transformation I am using created under cms.Root:
<li><img style="border: none;" src="<%# IfCompare(ImageHelper.IsImage((string)Eval("AttachmentExtension")), true, GetAttachmentIconUrl(Eval("AttachmentExtension"), null), GetAbsoluteUrl(GetAttachmentUrl(Eval("AttachmentName"), Eval("NodeAliasPath")), Eval<int>("AttachmentSiteID"))) %>" data-thumb="<%# IfCompare(ImageHelper.IsImage((string)Eval("AttachmentExtension")), true, GetAttachmentIconUrl(Eval("AttachmentExtension"), null), GetAbsoluteUrl(GetAttachmentUrl(Eval("AttachmentName"), Eval("NodeAliasPath")), Eval<int>("AttachmentSiteID"))) %>" alt="<%# GetNotEmpty("AttachmentTitle;AttachmentName") %>" /></li>
Thanks for the help