Quantcast
Channel: DevNet Questions
Viewing all articles
Browse latest Browse all 8901

Attachments in transformation

$
0
0
Hi, in Kentico 9 I want to have two kinds of attachments in products: jpg images and mp3 sound files. Both sets I am going to display on Product Details page via two different Basic Repeater Web Parts. I have several problems and questions:Below is ASCX transformation I created. I got error 404 - it does not find src images, which I added to Attachments in Properties tab of the product I am testing: @li@@a href= @@%# GetAbsoluteUrl(GetAttachmentUrl(EvalText(@AttachmentName@, true), Eval(@NodeAliasPath@)), EvalInteger(@AttachmentSiteID@)) %@ + ?maxsidesize=960@ class=@fancyboxProductImg@ title=@@%# EvalText(@AttachmentTitle@, true) %@@@ @img src=@@%# GetAbsoluteUrl(GetAttachmentUrl(Eval(@AttachmentName@), Eval(@NodeAliasPath@)), EvalInteger(@AttachmentSiteID@)) %@ + ?maxsidesize=46@ class=@cloudcarousel2d@ alt=@@%# EvalText(@AttachmentTitle@, true) %@@ title=@@%# EvalText(@AttachmentDescription@, true) %@@ /@@/a@@/li@ In Properties-@Attachments I see my two jpg and two mp3 files, but only when I press Edit button. When I press the link itself - I get @The resource you are looking for removed or temporary unavailable@. Looks like I missed some step of attachments adding. Did I add them properly? Maybe I have to create two separate new fields, say ProductImages and ProductMP3s? In that case my above transformation should be re-writtenIf I continue to use Properties-@Attachments - how can I differentiate two types of attachments, and really send them to separate Repeaters?Thanks, Evgeny

Viewing all articles
Browse latest Browse all 8901

Trending Articles