Good morning. I'm having difficulty retrieving attachments for a custom page type in a transformation. If I use a Text/XML transformation (as follows), the images display as expected.@p@@strong@Model Name:@/strong@ {%SKUName%}@/p@
{% foreach (attachment in Documents[NodeALiasPath].AllAttachments) {
@@img src='~/getattachment/@ + attachment.AttachmentGUID + @/attachment.aspx' /@@;
} #%}
However, due to some logic that I need to inject related to another field, I need to use an ASCX transformation. The following (pulled largely from Kentico documentation) gives no errors but displays nothing.@%@ Register Src=@~/CMSInlineControls/DocumentAttachments.ascx@ TagName=@DocumentAttachments@ TagPrefix=@cms@ %@
@p@@strong@Model Name:@/strong@ @%# Eval(@SKUName@) %@@/p@
@cms:DocumentAttachments ID=@ucDocAttachments@ runat=@server@ PageSize=@50@ TransformationName=@CMS.Root.Attachment@ Path='@%# Eval(@NodeAliasPath@) %@' /@
What am I missing? Both are being used in a transformation within the Kentico CMS. I'm using Kentico v10.0 and the ASPX + Portal engine. Thank you!
↧