Template:Number of archives
0
This template employs intricate features of template syntax. You are encouraged to familiarise yourself with its setup and parser functions before editing the template. If your edit causes unexpected problems, please undo it quickly, as this template may appear on a large number of pages. Remember that you can conduct experiments, and should test all improvements, in either the general Template sandbox or your user space before changing anything here. |
This template is brand new and not ready for use yet. --David Göthberg (talk) 10:41, 13 April 2009 (UTC) |
This is the {{number of archives}} meta-template.
It returns the number of archive pages a page has. It can count up to 999 archive pages.
When used without any parameter it automatically recognises archives that use standard "/Archive 1" naming. (Upper case "A", a space before the number, and no leading zeros.) It works both on the basepage that has archives under it, and on the archive pages themselves.
This template can take one parameter that tells where the archives are and the naming of the archive pages, so it can recognise archives like for instance "Talk:Somewhere else/arch1".
More documentation coming in some day.
Examples
Note the space after "/Archive " in the page name to David's page, since that page uses standard "/Archive 1" naming. While the other examples here don't have a space since they use non-standard naming such as "/Archive1".
{{number of archives}} = There are no [[Template:Number of archives/Archive 1]] pages. {{number of archives|User talk:Davidgothberg/Archive }} {{number of archives|Wikipedia:Administrators' noticeboard/Archive}} {{number of archives|Wikipedia:Administrators' noticeboard/IncidentArchive}}
0 = There are no Template:Number of archives/Archive 1 pages.
0
0
0
Technical details
This template calls {{number of archives/core}} which does most of the work. For documentation on the internal workings of these two templates see /core. The talk page also has more details.
See also
- {{archive number}} – Returns the number of the archive page it is on. Can count up to 300.
- {{Count pages}}
|
The above documentation is transcluded from Template:Number of archives/doc. (edit | history) Editors can experiment in this template's sandbox (create) and testcases (create) pages. Please add categories and interwikis to the /doc subpage. Subpages of this template. |