Modifying Blog Comments Section
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.
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"
<
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"
/>
Thanks for the response! I'll give your solution a try.
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.
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