xenvn

Items This Page - Xenforo 2 1.1.1

Adds a new template variable $xf.itemsThisPage containing how many posts/media items/resources/etc. are shown on a page.

This is useful in templates if you want to adjust the display of some element based on how many posts or threads or media items there are displayed.

For example, you might want to hide an element from the sidebar on short threads (or on the last page of a thread where only one or two posts are shown), to prevent the sidebar from being much longer than the content.

Usage example:
The following code might be used in a sidebar ad placement to hide the advert on short thread pages.
XML:
You must log in to view
(11 lines)
 

Attachments

Back
Top Bottom