Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: Leinnan on March 07, 2015, 07:16:55 PM

Title: Number of replies in header
Post by: Leinnan on March 07, 2015, 07:16:55 PM
I want to show number of replies on top of the topic. How to do this? I cannot find this variable.
Title: Re: Number of replies in header
Post by: shadow82x on March 07, 2015, 08:10:42 PM
Are you using SMF2.1?

What theme design are you using?
Title: Re: Number of replies in header
Post by: Leinnan on March 07, 2015, 08:11:42 PM
Of course. That's why I wrote here.
Title: Re: Number of replies in header
Post by: margarett on March 07, 2015, 08:18:41 PM
$context['num_replies'] is the variable you're looking for ;)

It is only set when viewing a topic (eg: in Display).

Quote from: Leinnan on March 07, 2015, 08:11:42 PM
Of course. That's why I wrote here.
Yeah but unfortunately we had a LOT of people posting here when using 2.0.x so we need to ask...
Title: Re: Number of replies in header
Post by: Leinnan on March 07, 2015, 08:29:17 PM
Thanks, work perfectly!
Quote from: margarett on March 07, 2015, 08:18:41 PM
Yeah but unfortunately we had a LOT of people posting here when using 2.0.x so we need to ask...
No problem.