Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Document Attachments in Repeater View modes: 
User avatar
Member
Member
dhemmings-wvmi - 4/3/2013 12:18:30 PM
   
Document Attachments in Repeater
I have searched the forums and read a lot of doucmentation which indicates this should work but isn't for me.

I have a repeater that is pointing to a folder within my site that contains several documents (pdf, word, etc...). Some of these documents have attachments (pictures) on them that are associated with the document.

I am trying to use the repeater with transformation to display the document title/description as well as the attached image if any exists. Following the guidlines from this page: http://devnet.kentico.com/docs/5_5/devguide/index.html?handling_attachments_in_transformations.htm

My transformation markup looks like the below. When I run it I get back blank <div><div class="Pager"> </div></div> warppers where I assume the attachment image should be.

Anyone have any ideas?

<%@ Register Src="~/CMSInlineControls/DocumentAttachments.ascx" TagName="DocumentAttachments" TagPrefix="cms" %>

<div>
<cms:DocumentAttachments ID="ucDocAttachments" runat="server" TransformationName="cms.root.attachment" Path='<%# Eval("NodeAliasPath") %>' />
</div>
<div>
<h2><a target="_blank" href="<%# GetFileUrl("FileAttachment") %>"><%# Eval("FileName") %></a></h2>
<%# Eval("FileDescription") %>
</div>

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 4/4/2013 6:56:38 AM
   
RE:Document Attachments in Repeater
Hi,

The dynamic path expression may be resolved too late for loading the data into the nested control.
Could you please try to use temporarily a fixed NodeAliasPath?
You could also add DelayedLoading="true" to the attachments control.
If the static path will make difference, you would need to set the path property in the transformation code-behind (<script runat="server">...</script>) using particular lifecycle method override.

Regards,
Zdenek