Latest Register Log In

+ Advanced Search

Totals of Each Type on Current Page

Totals of Each Type on Current Page
By
01/08/10 (Edited 03/11/14)

Suppose you want to show certain content only when there are premium type topics on the page being viewed. You may first think to test for that with <IF {CATTYPETOTALS[premium]}>, but that checks how many in the entire forum -- if you're on page 3, there may be no premium links on page 3 even though there are a bunch on page one. So, use {NUMPREMIUMLINKSONPAGE} instead. For example:
<IF {NUMPREMIUMLINKSONPAGE}>there are {NUMPREMIUMLINKSONPAGE} oremium links here on this page</IF>


This works in the 'display topics in forum' template and also in the 'search topics' template.




Description Checking how many topics of each type are on the current page.
Rating
Views 305 views. Averaging 0 views per day.