ASPX templates
Version 5.x > ASPX templates > Document Attachments View modes: 
User avatar
Member
Member
gstaylor-sfopera - 11/9/2010 5:18:32 PM
   
Document Attachments
I cannot seem to get attachments to display at all in the default transformation of a document type.

I have the webpart for document attachments defined at the top of the transformation;

<%@ Register Src="/CMSWebParts/Viewers/Documents/attachments.ascx" TagName="ReleaseList" TagPrefix="uc1" %>

Then I have the following tag entered a bit further in the same transformation;

<uc1:ReleaseList runat="server" ID="PressDocsList" ShowForDocumentTypes="custom.sfopressrelease" TransformationName="CMS.Root.Attachment" SelectedItemTransformationName="CMS.Root.Attachment" EnableViewState="false" Path='<%# Eval("NodeAliasPath") %>' AttachmentGroupGUID="ReleaseAttachments" />

The AttachmentGroupGUID property is set to the field name I've created for the document type form to allow the addition of attachments for the document type. When the default transformation is processed, the display only shows "No data found".

What am I doing wrong?

User avatar
Kentico Support
Kentico Support
kentico_radekm - 11/17/2010 4:49:35 AM
   
RE:Document Attachments
Hello.

The problem is most probably caused by lifecycle difference of webpart and transformation.

Webparts are not fully supported in transformations.

You would need to call ReloadData() method for given web part in some proper handler (OnPreRender) in your transformation.

Best Regards,
Radek Macalik

User avatar
Member
Member
gstaylor-sfopera - 11/17/2010 10:22:49 AM
   
RE:Document Attachments
What's the preferred method for displaying attachments from a document type transformation that have been entered via a form field?

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 12/6/2010 7:35:07 AM
   
RE:Document Attachments
Hi,

could you please take a look at this forum post describing how to use document attachment webpart in aspx templates and how to set its properties.

Best regards,
Ivana Tomanickova