public static MvcHtmlString CommentsCount(this HtmlHelper helper, string navigateUrl, IDataItem item) { if (item == null) { return(MvcHtmlString.Empty); } var contentItem = item as Content; bool?allowComments = contentItem != null ? contentItem.AllowComments : null; var threadKey = ControlUtilities.GetLocalizedKey(item.Id, null, CommentsBehaviorUtilities.GetLocalizedKeySuffix(item.GetType().FullName)); var itemTypeFullName = item.GetType().FullName; return(CommentsHelpers.CommentsCount(helper, navigateUrl, threadKey, itemTypeFullName, allowComments)); }
/// <summary> /// Renders comments list. /// </summary> /// <param name="helper">The helper.</param> /// <param name="item">The item.</param> public static MvcHtmlString CommentsList(this HtmlHelper helper, IDataItem item) { var title = CommentsHelpers.GetTitle(item); return(CommentsHelpers.GetCommentsList(helper, item, title)); }
/// <summary> /// Renders comments list. /// </summary> /// <param name="helper">The helper.</param> /// <param name="item">The item.</param> /// <param name="title">The title.</param> public static MvcHtmlString CommentsList(this HtmlHelper helper, IDataItem item, string title) { return(CommentsHelpers.GetCommentsList(helper, item, title)); }