Modifying Blog Comments Section

Posted by Community Admin on 04-Aug-2018 19:43

Modifying Blog Comments Section

All Replies

Posted by Community Admin on 10-Oct-2012 00:00

I'm using Sitefinity 5.1. I have the blog comment section setup so that only registered users can comment. Where can I modify the comment section so that the user's name is automatically assigned to the comment so the user doesn't have to type in their name when they comment. I also want to change the "You are not allowed to comment" message to something like "Please log in to comment." with the "log in" part as a hyperlink. I haven't been able to find in the code where I can implement these features and just need a point in the right direction.

Posted by Community Admin on 11-Oct-2012 00:00

Hi Jesse,

 Thank you for contacting us.

I have included two custom templates for the comments widget. One is the details view and one is the master. Please modify them to get the desired look and follow the instructions below to implement them:

To implement your two custom comments views please make the following modifications:

In the module where you comments will reside please add 

LayoutTemplatePath="~/App_Data/Sitefinity/WebsiteTemplates/ThemeName/WidgetTemplates/CommentsMasterView.ascx"
to both the master and detail content view so it looks like this:

<sf:ContentView
             id="commentsListView"
             ControlDefinitionName="BlogsCommentsFrontend"
             DetailViewName="CommentsMasterView"
             ContentViewDisplayMode="Master"
      LayoutTemplatePath="~/App_Data/Sitefinity/WebsiteTemplates/ThemeName/WidgetTemplates/CommentsMasterView.ascx"
             runat="server" />
        <sf:ContentView
             id="commentsDetailsView"
             ControlDefinitionName="BlogsCommentsFrontend"
      LayoutTemplatePath="~/App_Data/Sitefinity/WebsiteTemplates/ThemeName/WidgetTemplates/CommentsDetailsView.ascx"
             DetailViewName="CommentsDetailsView"
             ContentViewDisplayMode="Detail"
             runat="server" />

Let me know if you have any additional questions.

Regards,
Patrick Dunn
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 11-Oct-2012 00:00

Thanks for the response! I'll give your solution a try.

Posted by Community Admin on 04-Jun-2013 00:00

Where are these custom comment form templates you talk about? Can I get a copy?

I have to reorder the form elements of my comments form section, but I do not know what I need to put into the .ascx file, to make it work.

Thanks.

Posted by Community Admin on 05-Jun-2013 00:00

Hi,

 The templates for all controls - front and backend - are available in our SDK.

You can download that here.

http://www.sitefinity.com/resources/tools/software-development-kit

Regards,
Patrick Dunn
Telerik
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 Public Issue Tracking system and vote to affect the priority of the items

This thread is closed