Hi everyone,
Does anyone know how i can get a pages / posts total amount of comments to display the number of comments on the post?
Thanks in advance
Posted 02 October 2015 - 06:30 PM #1
Hi everyone,
Does anyone know how i can get a pages / posts total amount of comments to display the number of comments on the post?
Thanks in advance
Host & Name Ltd - your reliable & trustworthy media provider (www.hostandname.co.uk)
Approved CS-Cart Developers and Official CS-Cart Licensing Supplier
Web Hosting | Cloud Hosting | Dedicated Servers | VPS | Domains | Emails | Design | Development | Marketing | Management
Posted 03 October 2015 - 08:43 AM #3
I need to display the count of how many comments there are for a post like "Comments (2)" for example, i tried using this but always shows 0
{$subpage.discussion.posts|count}
Host & Name Ltd - your reliable & trustworthy media provider (www.hostandname.co.uk)
Approved CS-Cart Developers and Official CS-Cart Licensing Supplier
Web Hosting | Cloud Hosting | Dedicated Servers | VPS | Domains | Emails | Design | Development | Marketing | Management
Posted 04 October 2015 - 12:37 AM #4
And if you did:
<!-- pages: {$subpage.discussion.posts|print_r:true} -->
Does it show that you have array elements in $subpage.discussion.posts?
EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.
Posted 05 October 2015 - 08:57 AM #5
Please clarify where do you want to display the amount of comments?
Posted 05 October 2015 - 09:47 AM #6
Please clarify where do you want to display the amount of comments?
So there are 2 pages for example: blog list and blog single - i want to showing the amount of comments for each post on the blog list page.
Host & Name Ltd - your reliable & trustworthy media provider (www.hostandname.co.uk)
Approved CS-Cart Developers and Official CS-Cart Licensing Supplier
Web Hosting | Cloud Hosting | Dedicated Servers | VPS | Domains | Emails | Design | Development | Marketing | Management
Posted 05 October 2015 - 07:26 PM #7
Did you try what I suggested above to see what the results are? That will at least tell you if you have data in the variables you are expecting it in.
EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.
Posted 06 October 2015 - 09:32 AM #8
I am afraid, amount of comments is not get from DB for the list of posts. So additional code modifications are required to do it