This project is read-only.

How can i wrap the comments section in a non-repeating div?

Topics: Themes
Jan 13, 2011 at 6:42 AM

I would like to wrap all the comments that appear at the end of a post in a non-repeating div.

For example - if i put

<div class="my comment class">

- all my markup for the comment.view


in the commentview user control, then the div "my comment class" appears for each comment. I just want it appear once - i want all the comments wrapped in that single div.



Jan 13, 2011 at 9:03 AM

I think there's currently already one DIV around all the comments, that looks like:

<div id="commentlist" style="display:block">

You could try to use that existing DIV.

If you need another DIV to wrap around all the comments, the only option is to modify the CommentView.ascx file in the User Controls folder.  This file is used across all themes.  Typically it's more ideal to only modify your own theme, but for this situation, the only thing I can think of would to be modify this User Controls\CommentView.ascx file.  The part where the comments are output is:

<div id="commentlist" style="display:block">
  <asp:PlaceHolder runat="server" ID="phComments" />  

(that's the same DIV I showed up above)

The "phComments" placeholder is where all the comments are output.

Jan 13, 2011 at 9:32 AM

Thanks, either way one of those will work for me.

thanks for the help