Template:Pagecount

From LifeWiki
Revision as of 12:36, 27 August 2017 by Apple Bottom (talk | contribs) (Removed protection from "Template:Pagecount": Editing is already restricted to trusted users.)
Jump to navigation Jump to search

This template gives the number of pages that match the specified criteria. This should be used sparingly.

Parameters

Note: these specifications use 'and' logic; that is, the template will only include pages that match all of the specified conditions.

category This includes only pages belonging to the specified category (e.g. category=spaceships).
uses This includes only pages that use the specified template (e.g. uses=spaceship).
template This is the template to be searched when looking for pages that contain template calls with specific parameter values (e.g. template=spaceship). This is not the same as "uses", and will not give a result unless either 'category' or 'uses' are defined.
param This is the parameter that will be searched for in the template call specified by 'template' (e.g. param=synthesisRLE).* This parameter requires 'template' to be defined.
value This specifies the value of the template parameter defined by 'param' and 'template' (e.g. value=true).* For finding pages that have the parameter specified by 'param' with any assigned value, leave the 'value' parameter undefined. This parameter requires 'template' and 'param' to be defined.
total This will output the total number of pages without limitations created by the server if the parameter is given the value 'true' (e.g. total=true). This will negate the effects of 'template', 'param', and 'value'. This is usually used when the specifications are very general, such as category=patterns.

* There may be some problems with these parameters as the searched template is only matched for text, not actual values. To manipulate the output to give proper results you can use Perl regular expression syntax in assigning these values.

Examples

{{Pagecount
|category = glossary
}}

456


{{Pagecount
|category = spaceships
|template = spaceship
|param = synthesisRLE
|value = true
}}

39


The template call can be surrounded by text:

There are 39 spaceships with known glider syntheses.