Make the number of posts on a thread_view page available for widget conditionals and more

Stuart Wright

Well-known member
I often want to display sidebar widgets only when there are enough posts on the page so that the widgets don't extend way below the list of posts.
It's a rough but effective way of displaying more widgets when there are more posts.
Is it possible to add a variable available to thread_view which is the number of posts on the page?
Like $xf.vars.posts so I can have the conditional $xf.vars.posts > 10 for example?
 
Upvote 1
Top