* Graham * Mwebvendor
The total comments is not in the data array.
You can do it but it involves creating a twig template switcher and adding a extra blog function on the page then inserting the value with javascript
plus it can be a bit slow as basically it loads the entire post list and totals the comment counts and if you put the extra blog function above the main blog it changes the value of __xtblog_block_id to 2 (that's what it's for, to identify multiple blog functions on a single page)
so the javascript needs to go below the main blog function

Rename xtblog.twig to blog.twig and create a new xtblog.twig with this code
Create a new file in _xtgem_templates called com_count.twig
Then use this to provide the value to js
2017-04-14 02:36 (edited 2017-04-14 02:40 by Graham ) · (0)

Online: Guests: 1