XF 2.3 Widget condition for thread/page length

makanyane

New member
I have a widget display condition that works for widgets in thread_view sidebar
Code:
$context.thread.reply_count > 10
with the aim of limiting the amount of widgets displayed on vertically short pages.

I'm trying to work out a way of also accessing the page number or some other variable in the thread so I can also stop the widgets displaying
on the 2nd/later pages, so for a site where I have 30 replies per page it would look like

Code:
$context.thread.reply_count > 10 AND $xf.page == 1 OR $context.thread.reply_count > 40 AND $xf.page == 2 OR  etc

except $xf.page or $page don't seem to work - the only things I've been able to apply are the 'values' under 'thread' which don't have anything useful beyond the reply_count...

The info about page number is clearly available in the vars from thread_view:

1752845049229.webp


I'm just struggling to find out how to reference that in the widget display condition
 
Last edited:
Back
Top Bottom