Jump to content

Template:Section sizes/doc

From Wikipedia, the free encyclopedia

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]
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Section sizes in articles based on its TemplateData.

TemplateData for Section sizes

No description.

Template parameters

ParameterDescriptionTypeStatus
11

Override the name of the page to use

Default
{{ARTICLEPAGENAME}}
Example
1919 New Year Honours
Page nameoptional
stylestyle

CSS style

Example
float:right; margin-left:.5em
Stringoptional