ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Question about the Comment Tag

February 14, 2011 3:25pm

Subscribe [1]
  • #1 / Feb 14, 2011 3:25pm

    Robfletcher

    149 posts

    Let’s say i want to have a DIV with a line of text that shows the total number comments i have for a topic, so i do something like this:

    {exp:comment:entries channel="bloggy"}
            Showing {total_results} of {total_comments} comments.
    {/exp:comment:entries}

    The problem i have is because i have 2 comments on my blog this lines shows twice. I assume if i had 3 comments, it would show it 3 times. How do I make it so it just shows it once?

    crummy monday. 😊

    Thanks in advance

  • #2 / Feb 14, 2011 4:00pm

    Ingmar

    29245 posts

    Try this:

    {exp:channel:entries}
    {comment_total}
    {/exp:channel:entries}

    Note that this is still exp:channel:entries, no need to invoke exp:comment:entries.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases