Comments counter

Create issue
Issue #13 resolved
petrudumitru created an issue

Good morning,

How can i do a couting comments outside a post blog for example, inside the post of blog i can do comments|length .. but outside of that post from blogList for example i can't call that variable because does not exist?

Any idea about how to fix that please?

Thank you.

Comments (4)

  1. Hessel Kers

    Hi Alexey, I have the same issue. However the solution you mentioned above in the comment is not working for me. It seems I do something wrong with :slug. On my page with filename “blog/post.htm” & Url :” /blog/post/:slug “ the {{comments|length}} works fine. On my blog.htm page with url “ /blog/:page? ” {{ comments_number(post.slug) }} is not working and {{ comments|lenght }} shows the total amount of comments instead of the comments related to that single blog post. I use :slug in my component.

  2. Log in to comment