Showing product file list on list view template?

Posted by Community Admin on 04-Aug-2018 16:08

Showing product file list on list view template?

All Replies

Posted by Community Admin on 08-Apr-2014 00:00

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"
                <ul class="sfproductsList">
                    <asp:PlaceHolder ID="ProductContainer" runat="server" />
                <li class="sfproductListItem">
                    <div class="sfproductTmbWrp">
                        <sf:DetailsViewHyperLink ID="thumbnailLink" runat="server" ImageUrl='<%# Eval("ThumbnailUrl") %>' Text='<%# Eval("ThumbnailAlternativeText") %>' ToolTip='<%# Eval("Title") %>' />
                    <h2 class="sfproductTitle">
                        <sf:DetailsViewHyperLink Text='<%# (Eval("Title").ToString()).TruncateString(56, SitefinityExtensions.TruncateOptions.IncludeEllipsis) %>' runat="server" CssClass="sfproductTitleLnk" />

                    <div class="sfProductDocumentsAndFiles">
                        <sf:ProductDocumentsAndFilesControl ID="productDocumentsAndFilesControl" ProductItem='<%# DataBinder.Eval(Container.DataItem, "") %>' runat="server" />

                    <div class="sfproductPrice">
                        <sfCatalog:DisplayPriceField ID="displayPriceField" ObjectType="Product" ObjectId='<%# Eval("Id") %>' runat="server" />
                    <%--NOTE: Uncomment the next line to display custom product fields--%>
                    <%--<sf:ProductDynamicFields id="productDynamicFields" runat="server"></sf:ProductDynamicFields>--%>

Posted by Community Admin on 10-Apr-2014 00:00

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" />

The code is get from the detail view of product detail view.

Svetoslav Manchev
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items

This thread is closed