I am working on developing Page application with Kentico version 8.
I have integrated product module in my application, in CMS.Product created a custom field "Manuals" of PageAttachment type.
I have created an custom webpart in which I need to display attachments using Document attachment webpart within Repeater item template from code.
Here is my .aspx repeater code:
<asp:Repeater ID="rptProducts" runat="server" OnItemDataBound="rptProducts_ItemDataBound">
<div class="product-downloads-product" id="div<%#(Container.ItemIndex +1)%>">
<span class="show-downloads" data-toggle=".product-downloads-list" data-toggle-siblings=".product-downloads-product" onclick="ShowHide(<%#(Container.ItemIndex +1)%>)">Show Downloads</span>
<ul class="product-downloads-list" id="ul<%#(Container.ItemIndex +1)%>">
<cms:DocumentAttachments ID="pageAttachments" Path='<%#Eval("NodeAliasPath")%>' AttachmentGroupGUID="bc09f4fe-cad1-4c37-ac33-2b41e3bf8b8f" runat="server" TransformationName="Decore.Transformation.Product_DisplayDownloads" />
I am populating my repeater from code behind from Product data set, in repeater transformation displaying Product Name, Series column value and NodeAliasPath containing Path of each product. Need to get all the attachments of each products using Product NodeAliasPath as Path of Document attachment web part.
When running above code, it seems Path value going blank that is taking from '<%#Eval(NodeAliasPath)%>'.
I have checked <%#Eval(NodeAliasPath)%> its giving correct value of each product path, even I tried to bind Document attachment webpart Path into Repeater ItemDataBound event also, value assigning correctly but seems to not reaching at the time of assigning to document attachment webpart, its taking blank.
If I set document attachment Path value hard coded Product Node Alias Path into directly document attachment tag page it works fine. Like:
<cms:DocumentAttachments ID="pageAttachments" Path="/Products/Ranges/Discovery-48-Dual-Fuel-Range" AttachmentGroupGUID="bc09f4fe-cad1-4c37-ac33-2b41e3bf8b8f" runat="server" TransformationName="Decore.Transformation.Product_DisplayDownloads" />
Please help me where I am doing wrong or missed any thing to set.
Thanks in advance.