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 articles 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 category -- 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 articles in category' template and also in the 'search articles' template.




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