PagelistCount
Questions answered by this recipe
- How can I display the number of pages on my site, in a group, or matching some other criteria?
UPDATE: I have been informed by Pm that the features in this recipe have been included in PmWiki core starting with PmWiki version 2.2.0-beta51. This feature (fmt=count) is now documented in the fmt= section on the Page Lists page. Ian MacGregor.
Description
The fplcount.phpΔ script adds a fmt=count
option to (:pagelist:)
, returning a simple count of pages in the list. Here are some examples:
Pages on the site: (:pagelist list=all fmt=count:) Pages in the Cookbook group: (:pagelist group=Cookbook fmt=count:) Pages linking to Profiles.Pm: (:pagelist link=Profiles.Pm fmt=count:) |
Pages on the site: 10580 Pages in the Cookbook group: 2318 Pages linking to Profiles.Pm: 750 |
Installation
Add the following line to config.php
include_once('cookbook/fplcount.php');
Notes
Note that the option is fmt=count
without a '#', this differs from fmt=#count
(with a '#') in that the latter refers to a pagelist template named "#count".
Comments
How to add more than one group? Or, better, how to list all groups minus PmWiki, Main, Site (default installation groups).
See Also
Contributors
Sandbox
The recipe is enabled on this page -- feel free to experiment below.
There are (:pagelist list=normal fmt=count:) normal articles on this site. (:if equal (:pagelist list=normal fmt=count:) "6307" :) Hey it works! (:if end:) |
There are 10393 normal articles on this site. |
User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.