Module

Developer
Supported

Threaded Comments

ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From Yuri Salimovskiy

     

You must be logged in to post.

count_root not working as expected

Support Request

Maxwell
Maxwell

I have threaded comments working fine for displaying the comments, but I need to detect the last root level comment. So I thought I could use the {count_root} tag, but it’s not giving me what I need.

For testing, if I add this inside the <li> (which is inside the {comments} tag):

count_root {count_root} 

Testing this on a template that’s displaying 2 comment threads, the first of which has 3 children,  I get the following output:

<ul>
 <
li>count_root 1
  
<ul>
   <
li>count_root 1</li>
   <
li>count_root 1</li>
   <
li>count_root 1</li>
  </
ul>
 </
li>
 <
li>count_root 5</li>
</
ul

Now, I would expect the last count_root to come out as “2”, not “5”.
Am I missing something?
Is there any way at all for me to detect the newest root level comment?

(I’m using the latest version 2.4.6 of Threaded Comments)

Yuri Salimovskiy
# 1
Developer
Yuri Salimovskiy

Drop me a line to support@intoeetive.com - I will send you a pre-release version that should have that fixed.

Maxwell
# 2
Maxwell

Thanks Yuri, updated version is working as expected.

loemrntdherid1
# 3
loemrntdherid1