Edge Rewrite
// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a23a38c21cdc891a

Jump to content

Template:NUMBEROFSECTIONS/doc

From Wikipedia, the free encyclopedia

Usage

[edit]

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

[edit]
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 = 2
{{NUMBEROFSECTIONS|level=3}} will transclude the number of level 3 sections in the page this is placed = 1
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) = 26
{{NUMBEROFSECTIONS|Wikipedia:Village pump (idea lab)|level=4}} will transclude the number of level 4 sections in Wikipedia:Village pump (idea lab) = 0
{{NUMBEROFSECTIONS|Wikipedia:Village pump (proposals)|level=23}} will transclude the number of level 2 and 3 sections in Wikipedia:Village pump (proposals) = 18
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. to get the number of level 4 sections in Wikipedia:Village pump (proposals), (technical) and (idea lab):
{{NUMBEROFSECTIONS|Wikipedia:Village pump (proposals)#Wikipedia:Village pump (technical)#Wikipedia:Village pump (idea lab)|level=4}} = 0

See also

[edit]