Showing product file list on list view template?
Like the default product details template uses the <sf:ProductDocumentsAndFilesControl />, I want to show this same list of files/documents in the List view for products.
This is the list template, with the added control to show doucments and files, but I'm not sure how to specify ProductItem for the control. It shows up as blank when rendered. What do I need to reference on the list item template to feed into this control? Code is below. Thanks.
<telerik:RadListView ID="productsListView"
runat="server"
ItemPlaceholderID="ProductContainer"
EnableEmbeddedSkins="false"
EnableEmbeddedBaseStylesheet="false">
<LayoutTemplate>
<ul class="sfproductsList">
<asp:PlaceHolder ID="ProductContainer" runat="server" />
</ul>
</LayoutTemplate>
<ItemTemplate>
<li class="sfproductListItem">
<div class="sfproductTmbWrp">
<sf:DetailsViewHyperLink ID="thumbnailLink" runat="server" ImageUrl='<%# Eval("ThumbnailUrl") %>' Text='<%# Eval("ThumbnailAlternativeText") %>' ToolTip='<%# Eval("Title") %>' />
</div>
<h2 class="sfproductTitle">
<sf:DetailsViewHyperLink Text='<%# (Eval("Title").ToString()).TruncateString(56, SitefinityExtensions.TruncateOptions.IncludeEllipsis) %>' runat="server" CssClass="sfproductTitleLnk" />
</h2>
<div class="sfProductDocumentsAndFiles">
<sf:ProductDocumentsAndFilesControl ID="productDocumentsAndFilesControl" ProductItem='<%# DataBinder.Eval(Container.DataItem, "") %>' runat="server" />
</div>
<div class="sfproductPrice">
<sfCatalog:DisplayPriceField ID="displayPriceField" ObjectType="Product" ObjectId='<%# Eval("Id") %>' runat="server" />
</div>
<%--NOTE: Uncomment the next line to display custom product fields--%>
<%--<sf:ProductDynamicFields id="productDynamicFields" runat="server"></sf:ProductDynamicFields>--%>
</li>
</ItemTemplate>
</telerik:RadListView>
Hi Ryan,
I have tested the following code on the Sitefinity 6.3 and it shows all the related documents to the product:
<
div
class
=
"sfProductDocumentsAndFiles"
>
<
sf:ProductDocumentsAndFilesControl
id
=
"productDocumentsAndFilesControl"
ProductItem='<%# Page.GetDataItem() %>' runat="server" />
</
div
>