Template:NUMBEROFSECTIONS/doc
From HandWiki
< Template:NUMBEROFSECTIONS
Revision as of 21:47, 5 May 2020 by imported>Pppery
This template uses Lua: |
This is a documentation subpage for Template:NUMBEROFSECTIONS It may contain usage information, categories and other content that is not part of the original template page. |
Usage
Use to get the number of sections of a specified level on a specified page or without specifying either parameter (see below), get the number of level 2 ( i.e. sections denoted by "==" ) sections on the page where called.
Parameters
- Getting the number of sections on the page where placed
{{NUMBEROFSECTIONS}}
will transclude the number of level 2 sections in the page this is placed =Script error: No such module "NUMBEROFSECTIONS".
{{NUMBEROFSECTIONS|level=3}}
will transclude the number of level 3 sections in the page this is placed =Script error: No such module "NUMBEROFSECTIONS".
- Getting the number of sections on other pages
{{NUMBEROFSECTIONS|Wikipedia:Village pump (technical)}}
will transclude the number of level 2 sections in Wikipedia:Village pump (technical) =Script error: No such module "NUMBEROFSECTIONS".
{{NUMBEROFSECTIONS|Wikipedia:Village pump (idea lab)|level=4}}
will transclude the number of level 4 sections in Wikipedia:Village pump (idea lab) =Script error: No such module "NUMBEROFSECTIONS".
{{NUMBEROFSECTIONS|Wikipedia:Village pump (proposals)|level=23}}
will transclude the number of level 2 and 3 sections in Wikipedia:Village pump (proposals) =Script error: No such module "NUMBEROFSECTIONS".
- Arbitrary numbers of pages
- State any number of
#
delimited pages to get the total number of named sections ( or the default 2s ) in those pages e.g. {{NUMBEROFSECTIONS|Wikipedia:Village pump (proposals)#Wikipedia:Village pump (technical)#Wikipedia:Village pump (idea lab)|level=4}}
will transclude the number of level 4 sections in Wikipedia:Village pump (proposals), (technical) and (idea lab).
See also
- Category:Magic word templates
- Category:Wikipedia variable-like templates
- Category:Boolean, register, and condition testing templates