Skip to content

Instantly share code, notes, and snippets.

@sitefinitySDK
Created November 1, 2017 16:45
SF_10.1, SF_10.2, SF_11.0, SF_11.1, SF_11.2, SF_12.0, SF_12.1, SF_12.2, SF_13.0, SF_13.1, SF_13.2, SF_13.3 - https://docs.sitefinity.com/tutorial-add-comments-widget-and-counter-in-a-widget-template
<%@ Control Language="C#" %>
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Modules.Comments.Web.UI.Frontend" TagPrefix="comments" %>
<%-- Add Comments widget --%>
<comments:CommentsWidget runat="server"
ThreadKey='<%# ControlUtilities.GetLocalizedKey((Guid)Eval("Id")) %>'
AllowComments='true'
ThreadTitle='<%# Eval("Title") %>'
ThreadType='<%# Container.DataItem.GetType().FullName %>'
GroupKey='<%# ControlUtilities.GetUniqueProviderKey("Telerik.Sitefinity.Modules.News.NewsManager", Eval("Provider.Name").ToString()) %>' />
<%-- Add Comments counter --%>
<comments:CommentsCountControl runat="server"
ThreadKey='<%# ControlUtilities.GetLocalizedKey((Guid)Eval("Id")) %>'
NavigateUrl="#commentsWidget"
AllowComments='<%# Eval("AllowComments") %>'
DisplayMode="ShortText"
ThreadType='<%# Container.DataItem.GetType().FullName %>'/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment