Template:Section sizes/doc
This is a documentation subpage for Template:Section sizes. It may contain usage information, categories and other content that is not part of the original template page. |
This template is used on approximately 3,300 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
This template uses Lua: |
To be used on the talk pages of very long articles, or in discussion of other articles where it is desired to show the sizes of subsections. The largest byte count and cumulative section total are coloured in red; the larger a section is, the redder it's shaded.
Usage
[edit]Use:
{{Section sizes}}
or include the name of a page as the first (and only) parameter, as one of:
{{Section sizes|1919 New Year Honours}}
{{Section sizes|1=1919 New Year Honours}}
or include a CSS style string:
{{Section sizes|1919 New Year Honours|style=float:right; margin-left:.5em}}
Example
[edit]{{Section sizes|1919 New Year Honours}}
Messaging
[edit]There are three fatal errors and one advisory message which may be reported by the template.
Fatal errors:
- error: no article: <article title> – emitted when the template cannot fetch the content of <article title>
- error: <article title> is a redirect – emitted when <article title> is a redirect
- error: no sections found in: <article title> – emitted when <article title> does not have any sections except the lede
Advisory message:
- markup removed; cannot link – this is emitted when a section header of the article contains invalid markup such as an embedded citation; in this case, the section header is emitted in plain text as it cannot be linked for technical reasons. The gory details follow.
The template attempts to correctly render and link section names. That is not always possible because of Html and wiki markup that should not be in the section name; see MOS:HEAD. The template attempts to render a readable, but unlinked section name with a message and link to this page when Html and wiki markup is found. For these cases, the page that transcludes this template will be added to a tracking category.
The template retains bold ('''
) and italic (''
) wiki markup and will leave any self-closed <nowiki />
tags. When templates are present, this template renders them and then removes any Html and Html-like markup. Wikilinks in the section name are replaced with their display text.
Categorization
[edit]When an unlinked section name is emitted in the table along with a "markup removed" error (see § Messaging) because of parsing issues in the section header, the page on which the template appears is tracked in Category:Pages with Template:Section sizes errors.
TemplateData
[edit]TemplateData for Section sizes
No description.
Parameter | Description | Type | Status | |
---|---|---|---|---|
1 | 1 | Override the name of the page to use
| Page name | optional |
style | style | CSS style
| String | optional |