More in this section

Forums / Developing with Sitefinity / Highlight comments from users of a specific Role

Highlight comments from users of a specific Role

2 posts, 0 answered
  1. cDima
    cDima avatar
    2 posts
    Registered:
    27 Dec 2007
    27 Jan 2009
    Link to this post
    Hello,

    I would like to customize the Comments for News. If a comment's author belongs to a specific Role, the comment should have a specific CssClass. Then we can highlight comments from "special" users of our site. Can this be done with sitefinity?

    I have successfully extended the CommentList control for the News module, but can't figure out that is next.

    Please help,
    Dmitri

  2. cDima
    cDima avatar
    2 posts
    Registered:
    27 Dec 2007
    29 Jan 2009
    Link to this post
    Solved it, one can edit the Sitefinity\ControlTemplates\News\Modes\ListPageDetails.ascx template for a news item, within the repeater commentsList:

    <%#System.Web.Security.Roles.IsUserInRole(DataBinder.Eval(Container, "DataItem.Owner"), "experts").ToString() %>
2 posts, 0 answered