+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Modifying Blog Comments Section

Modifying Blog Comments Section

5 posts, 0 answered
  1. Jesse
    Jesse avatar
    6 posts
    Registered:
    10 Aug 2011
    10 Oct 2012
    Link to this post
    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.
  2. Patrick Dunn
    Patrick Dunn avatar
    237 posts
    Registered:
    03 Nov 2014
    11 Oct 2012
    Link to this post
    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
  3. Jesse
    Jesse avatar
    6 posts
    Registered:
    10 Aug 2011
    11 Oct 2012 in reply to Patrick Dunn
    Link to this post
    Thanks for the response! I'll give your solution a try.
  4. Lurch
    Lurch avatar
    64 posts
    Registered:
    18 Jan 2011
    04 Jun 2013
    Link to this post
    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.
  5. Patrick Dunn
    Patrick Dunn avatar
    237 posts
    Registered:
    03 Nov 2014
    05 Jun 2013
    Link to this post
    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
5 posts, 0 answered