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

Forums / Bugs & Issues / News - Comments functionality

News - Comments functionality

5 posts, 1 answered
  1. shraddha
    shraddha avatar
    87 posts
    Registered:
    18 May 2009
    20 Jul 2009
    Link to this post
    Hi,

    I am using Comments functionality in news module.
    it is working fine.
    But I want to do some html level changes in news comments list structure.
    I have copied "CommentsList.ascx" from blogs module to news.
    But the changes I am doing are not getting reflected.
    Please htlp....
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    20 Jul 2009
    Link to this post
    Hi shraddha,

    First, there are two building parts - front end ( public controls) and backend ( the admin interface). The template you downloaded is used by NewsView control. The module - News uses the following templates - CommentsPreview.ascx, CommentsList.ascx and CommentsEdit.ascx.

    However, below are the steps that you should follow if you want to apply the changes you have made to CommentsList.

    1. Map the external template for NewsView control - ListPageDetails. More information at Mapping ContentViewDesigners and working with Presentation Modes

    2. In the template above there is a control CommentsList. Set the layoutTemplatePath for this control to points your customized template.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. shraddha
    shraddha avatar
    87 posts
    Registered:
    18 May 2009
    20 Jul 2009
    Link to this post
    Hi Ivan,

    Thanx for the reply...
    I have gone through the stuff sent by you. But i don't think it is actully the thing that i want.
    I am done with the News-Comment part, public control as well as admin interface with moderator functioality and everything works fine.
    What i just want to do is make changes in CommentsList.ascx. For that I have copied the same file from blogs folder to the news. But what should I add ... so that If I make changes in ~/Sitefinity/ControlTemplates/News/CommentsList.ascx, it will reflect. I want to change positions of some HTML objects in comment public control to make it as per my requirement.
  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    20 Jul 2009
    Link to this post
    Hi shraddha,

    Thank you for using our services.

    After you have edited the template for the comments list you have to "tell" your CommentsList control to use this template. Open the template for the single news item (~/Sitefinity/ControlTemplates/News/ListPageDetails.ascx) and at the bottom find the declaration for the the CommentsList control and provide the path to your template like this:

    <div id="comments" class="sf_contentComments">  
    <sfWeb:CommentsList ID="commentsList" runat="server" CssClass="sf_commentsList"  
             LayoutTemplatePath="~/Sitefinity/ControlTemplates/News/CommentsList.ascx">   
    </sfWeb:CommentsList>  
    </div>  
     

    Now you will have to make your NewsView control to use this template when displaying single news items (~/Sitefinity/ControlTemplates/News/ListPageDetails).

    This should do the trick. If you have more questions, please feel free to contact us.

    Regards,
    Rado
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
    Answered
  5. shraddha
    shraddha avatar
    87 posts
    Registered:
    18 May 2009
    20 Jul 2009
    Link to this post
    Hi Rado,

    It Helped. Thanx for the help....
Register for webinar
5 posts, 1 answered