Tutorial: Add comments to the product list templates
By default comments are not added to the product lists. In order to have this functionality follow the steps below:
PREREQUISITES: You have created at least one product. For more information, see Create products.
After you have dragged the Product list widget on your page, the widget automatically displays all created products.
To configure the display of the products, perform the following:
- Click Edit button in the upper-right corner of the widget.
- Open the Product list widget designer in the back-end
- Go to Single Items Settings
- Select template you want to edit and click "Edit selected template"

- In the opened template, place the CommentsWidget on a place chosen by you. The code for the widget should look similar to the one below:
<
comments:CommentsWidget
runat
=
"server"
ThreadKey='<%# ControlUtilities.GetLocalizedKey(Eval("Id")) %>'ThreadTitle='<%# Eval("Title") %>'
ThreadType='<%# Container.DataItem.GetType().FullName %>'
GroupKey='<%# ControlUtilities.GetUniqueProviderKey("Telerik.Sitefinity.Modules.Ecommerce.Catalog.CatalogManager", Eval("Provider.Name").ToString()) %>'
/>
Add a reference to the following namespace to access the widget:
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Modules.Comments.Web.UI.Frontend" TagPrefix="comments" %>
- You could also add comments count to the template. It displays the number of comments for an item. When clicked sets the focus to the comments widget. Here's the markup to add the comments count to the template:
<
comments:CommentsCountControl
runat
=
"server"
ThreadKey='<%# ControlUtilities.GetLocalizedKey(Eval("Id")) %>'
NavigateUrl="#commentsWidget" DisplayMode="ShortText" ThreadType='<%# Container.DataItem.GetType().FullName %>'
/>
After following all steps the result will be similar to this:

The comments are visible also in the back-end under Content » Comments section: