Count pages in a category
For this trick I use the [module listpages] wich has the variabel %%total%%.
I some cases it can be nice to have an indicator like 3/10 and 4/10… where you can use the %%total%% variable. Like here:
| 1/8 | Test |
| 2/8 | Harry Potter |
| 3/8 | Das Kapital |
| 4/8 | Through the Looking-Glass |
| 5/8 | The Invisible Book |
| 6/8 | Guinessbook of records |
| 7/8 | Lord of the rings |
| 8/8 | Alice In Wonderland |
[[module listpages category="book" separate="no"]]
||%%index%%/%%total%%||%%title_linked%%||
[[/module]]
But this trick will only give you the "10" by setting the limit to 1
| total pages in "book" category is: 8 |
[[module listpages category="book" limit="1"]]
total pages in "book" category is: %%total%%
[[/module]]
page revision: 10, last edited: 30 Jul 2010 10:00





