Difference between revisions of "Template:Expand section/doc"

From blackwiki
Jump to navigation Jump to search
imported>Nnemo
imported>Sdkb
 
(58 intermediate revisions by 29 users not shown)
Line 1: Line 1:
 
{{documentation subpage}}
 
{{documentation subpage}}
 +
{{high-use| ≈ 33290 }}
  
This is the {{Tlx|Expand section}} message box.
+
== Usage ==
 +
Place this template at the beginning of article sections that need expansion, ''after'' that section's title. You can use this template in the Main/Article or Wikipedia namespaces.
 +
 
 +
{{As of |2016|August}}, this template only uses the "article message box" (Ambox) style; this will be fixed in the future.
 +
 
 +
Recommended use is with a talk page link explaining what is needed and ''especially any justification for your judgement''.
 +
 
 +
Note: {{tl|sect-stub}} is a shortcut used for consistency with [[Template:Stub|other]] [[Template:Cleanup|cleanup]] [[Template:Cleanup section|templates]].
  
It can be placed at the top of article sections that need expansion, ''after'' the section title. It can also be used on other pages such as in "Wikipedia:" space. (This template currently only uses the "article message box" style, but that is a bug we are going to fix.)
+
<pre>
 +
{{Expand section
 +
| 1          = (or with= or for=)
 +
| section    = (section number)
 +
| small      = no (default is "yes")
 +
| talksection = (link with NO brackets, "[[]]"; displays only if small=no)
 +
| date        = Month YYYY
 +
| period      = <!--no--> (included after the input for "1=" from above by default - use this only in instances where terminal punctuation should be placed before a reference)
 +
}}
 +
</pre>
  
This template can be used without any parameters, like this:
+
'''or inline short form'''
  
:{{Tlx|Expand section}}
+
<pre>{{Expand section | 1 = (or with= or for=) | section = (section number) | small = no (default is "yes") | talksection= (or talk= or discuss=) | date= }}</pre>
  
{{Expand section}}
+
===Parameters===
 +
This template may be used without parameters, and a BOT will add the date when necessary.
  
It can also take the current month and year as a parameter, which is used in categorising the page into a corresponding category. (See more on that hereafter.) Like this:
+
;date=
 +
:The current month and year can be used in the {{para|date}} parameter. This will add the page to a sub-category sorted by date used (see the [[#Categorisation|Categorisation]] section of this page for more information:
  
:{{Tlx|Expand section|2=date={{CURRENTMONTHNAME}} {{CURRENTYEAR}} }}
+
:{{Tlx|Expand section|date{{=}}{{CURRENTMONTHNAME}} {{CURRENTYEAR}} }}
  
or
+
:or
  
 
:{{Tlx|Expand section|<nowiki>{{subst:DATE}}</nowiki>}}
 
:{{Tlx|Expand section|<nowiki>{{subst:DATE}}</nowiki>}}
 +
 +
:results in:
  
 
{{Expand section|date={{CURRENTMONTHNAME}} {{CURRENTYEAR}} }}
 
{{Expand section|date={{CURRENTMONTHNAME}} {{CURRENTYEAR}} }}
  
There are [[Wikipedia:Bot policy|bots]] that edit the pages and add the '''date''' parameter if you forget to do it. The date parameter causes no visible change in the message box itself, it only makes the page categorise properly.
 
  
This template can also take a {{para|1}} parameter with an explanation of what expansion the section needs. And you can of course feed the date parameter at the same time. Like this:
+
;section=
 +
:The {{para|section}} parameter is used to link to the edit screen of the article's section in which this template is placed. If this template is placed in the second section after the TOC, then use {{para|section|2}}:
 +
 
 +
:{{Tlx|Expand section|section{{=}}2|<nowiki>{{subst:DATE}}</nowiki>}}
 +
 
 +
:results in:
 +
 
 +
{{Expand section|section=2|date={{CURRENTMONTHNAME}} {{CURRENTYEAR}} }}
 +
 
 +
:and links to the edit screen for the ''second section'' of the page ''after the TOC''.
 +
 
 +
 
 +
;1=, with=, or for=
 +
:An unnamed parameter, {{para|1}} (or one of the named parameters, {{para|with}} or {{para|for}}), may be used to explain what expansion is needed in the section:
 +
 
 +
:{{Tlx|Expand section|1{{=}}examples and additional citations|section{{=}}1|date{{=}}{{CURRENTMONTHNAME}} {{CURRENTYEAR}} }}
 +
 
 +
:results in:
 +
 
 +
{{Expand section|1=examples and additional citations|section=1|date={{CURRENTMONTHNAME}} {{CURRENTYEAR}}|talksection=Template talk:Expand section#When should this template be used? }}
 +
 
 +
:When multiple expansion issues need to be raised, explain them in a new section on the article's [[WP:Talk page|discussion page]], and use the next two parameters for reader convenience.
  
:{{Tlx|Expand section|2=1=examples and additional citations|3=date={{CURRENTMONTHNAME}} {{CURRENTYEAR}} }}
 
  
{{Expand section|1=examples and additional citations|date={{CURRENTMONTHNAME}} {{CURRENTYEAR}} }}
+
;small= and talksection=
  
When multiple expansion issues need to be raised, a bullet list can be made:
+
:The default for the {{para|small}} parameter is "yes", which means that if this parameter is omitted, then the size of the tag will default to the sizes shown above. Use {{para|small|no}} to result in a larger section tag and to enable the {{para|talksection}} parameter ({{para|talk}} or {{para|discuss}} may also be used):
  
:{{Tlx|Expand section|1{{=}}&lt;nowiki /&gt;<br />* Career from 1952 to 1960 <br />* Final days after 1972 retirement <br />
+
:{{Tlx|Expand section|1{{=}}examples and additional citations|section{{=}}1|date{{=}}{{CURRENTMONTHNAME}} {{CURRENTYEAR}}|small{{=}}no|talksection{{=}}Template talk:Expand section#When should this template be used?}}
|<nowiki>{{subst:DATE}}</nowiki>}}
 
  
{{Expand section|1=<nowiki />
+
:results in:
* Career from 1952 to 1960
 
* Final days after 1972 retirement
 
|date=February 2012}}
 
  
(The <code>&lt;nowiki /&gt;</code> is required or the first item will not display correctly.) If this list were longer than three items, it would probably be better raised on the talk page.
+
:{{Expand section|1=examples and additional citations|section=1|date={{CURRENTMONTHNAME}} {{CURRENTYEAR}}|small=no|talksection=Template talk:Expand section#When should this template be used?}}
  
 
== Categorisation ==
 
== Categorisation ==
When this template is used in main (article) space it places the article in [[:Category:Articles to be expanded]] or in a dated category like [[:Category:Articles to be expanded from {{CURRENTMONTHNAME}} {{CURRENTYEAR}}]] if the date parameter "date={{CURRENTMONTHNAME}} {{CURRENTYEAR}}" is specified. It also places the article in [[:Category:All articles to be expanded]].
 
  
== Usage ==
+
When {{Tlx|Expand section}} is used without a {{para|date}} parameter in an article in the [[WP:Mainspace|main article]] [[WP:Namespace|namespace]], the article is sorted to {{Cat|Articles to be expanded}}. A bot or an editor will then add the date parameter, and the article will be sorted to a category with a name that reflects the date given. For example, if the {{para|date|{{CURRENTMONTHNAME}} {{CURRENTYEAR}}}} is used, the article will be added to {{Cat|Articles to be expanded from {{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}. 
* If the section is completely empty, you can use {{Tlx|Empty section}} instead.
+
 
* For the references section, use one of {{Tlx|No footnotes}} and {{Tlx|More footnotes}} instead.
+
No matter what parameters are used with this template, it also adds the article to {{Cat|All articles to be expanded}}.
 +
 
 +
== Choosing the right template ==
 +
 
 +
=== For an empty section ===
 +
 
 +
If the section is completely empty, the {{Tlx|Empty section}} template should be used instead of this template.  
 +
 
 +
The exception would be an empty section used for references as explained in the following subsection.
 +
 
 +
=== For a References or Notes section ===
 +
 
 +
When the section that needs expansion is used to list cited sources, then either {{Tlx|No footnotes}} or {{Tlx|More footnotes needed}} should be used instead of {{Tlx|Empty section}} or {{Tlx|Expand section}}.
 +
 
 +
'''Note:''' Unlike the other templates mentioned, those "footnotes" templates should go at the beginning/TOP of the page, just under any hatnotes, rather than at the beginning of a section.
 +
 
 +
In the main article namespace, [[WP:Citing sources|citing sources]] is an important part of the article, performed by using the tags, <code><nowiki><ref></ref></nowiki></code>, which in turn are collected and formatted into text in the section containing the {{Tlx|Reflist}} template or the <code><nowiki><references /></nowiki></code> tag. This section (or sub-section, as might be the case if the sources are listed separately) is often titled "References", and can have other names.
 +
 
 +
If the article has a section that contains either {{Tlx|Reflist}} or <code><nowiki><references /></nowiki></code>, ''the section can still appear blank'' on the saved, rendered page if the article has no text within <code><nowiki><ref></ref></nowiki></code> tags. Such a section is still considered blank, even though the template or tag wikitext can be seen in Edit mode. In that case the {{Tlx|No footnotes}} template should be used at the TOP of the page just beneath any hatnotes.
 +
 
 +
== TemplateData ==
 +
{{TemplateData header}}
 +
<!-- Why no "reason" here for the param "reason"? This is very confusing. At the beginning, an example with "reason =" is given. --><templatedata>
 +
{
 +
"description": "Can be placed at the beginning of article sections that need expansion, after the section title.",
 +
"params": {
 +
"1": {
 +
"label": "Reason",
 +
"description": "Reason the template was added, an explanation of what expansion the section needs. A bulleted list with lines beginning '*' can be given.",
 +
"type": "content",
 +
"required": false,
 +
"aliases": [
 +
"with",
 +
"for"
 +
]
 +
},
 +
"period": {
 +
"label": "Terminal punctuation",
 +
"description": "If set to 'no', this parameter omits the terminal punctuation after the input for the 'with'/'for' parameter (i.e., the reason the template was added); this is normally only used if references are included after terminal punctuation.",
 +
"type": "boolean",
 +
"required": false,
 +
"example": "no",
 +
"default": "yes",
 +
"autovalue": "",
 +
"aliases": [
 +
"punctuation"
 +
]
 +
},
 +
"talksection": {
 +
"label": "Talk section",
 +
"description": "A section heading in the talk page where the issue is discussed. Note: The talksection parameter only displays if the parameter small is set to 'no'.",
 +
"type": "string",
 +
"required": false,
 +
"aliases": [
 +
"discuss",
 +
"talk"
 +
]
 +
},
 +
"date": {
 +
"label": "Month and year",
 +
"description": "The month and year the template was added, e.g. 'July 2017'.",
 +
"type": "string",
 +
"required": false,
 +
"autovalue": "{{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}",
 +
"suggested": true
 +
},
 +
"small": {
 +
"label": "Small",
 +
"description": "By default the template will be displayed in a small size. This can be changed by setting small to no. Not recommended in articles.",
 +
"type": "boolean",
 +
"required": false,
 +
"example": "no",
 +
"default": "yes",
 +
"autovalue": ""
 +
},
 +
"section": {
 +
"description": "Section number of the section with the template",
 +
"type": "number"
 +
}
 +
},
 +
"format": "inline"
 +
}
 +
</templatedata>
  
 
== See also ==
 
== See also ==
* {{Tlx|Expand section}}
+
* {{tlx|Clarify}} and {{tlx|Explain}} (both inline)
* {{Tlx|Expand further}}
+
* {{tlx|Incomplete list}}
* {{Tlx|Expand list}}
+
* {{tlx|Empty section}}
* {{Tlx|Empty section}}
+
* {{tlx|Missing information}}
  
<includeonly>
+
<includeonly>{{Sandbox other||
  
 
[[Category:Cleanup templates|{{PAGENAME}}]]
 
[[Category:Cleanup templates|{{PAGENAME}}]]
 
[[Category:Exclude in print]]
 
[[Category:Exclude in print]]
 +
[[Category:Wikipedia section templates]]
  
</includeonly>
+
}}</includeonly>
 
 
<includeonly>
 
 
 
[[es:Plantilla:Expansión]]
 
[[id:Templat:Kembangkan bagian]]
 
[[uk:Шаблон:Expand section]]
 
 
 
</includeonly>
 

Latest revision as of 17:32, 12 January 2021

Usage

Place this template at the beginning of article sections that need expansion, after that section's title. You can use this template in the Main/Article or Wikipedia namespaces.

As of August 2016, this template only uses the "article message box" (Ambox) style; this will be fixed in the future.

Recommended use is with a talk page link explaining what is needed and especially any justification for your judgement.

Note: {{sect-stub}} is a shortcut used for consistency with other cleanup templates.

{{Expand section
 | 1           = (or with= or for=)
 | section     = (section number)
 | small       = no (default is "yes")
 | talksection = (link with NO brackets, "[[]]"; displays only if small=no)
 | date        = Month YYYY
 | period      = <!--no--> (included after the input for "1=" from above by default - use this only in instances where terminal punctuation should be placed before a reference)
}}

or inline short form

{{Expand section | 1 = (or with= or for=) | section = (section number) | small = no (default is "yes") | talksection= (or talk= or discuss=) | date= }}

Parameters

This template may be used without parameters, and a BOT will add the date when necessary.

date=
The current month and year can be used in the |date= parameter. This will add the page to a sub-category sorted by date used (see the Categorisation section of this page for more information:
{{Expand section|date=December 2025}}
or
{{Expand section|{{subst:DATE}}}}
results in:


section=
The |section= parameter is used to link to the edit screen of the article's section in which this template is placed. If this template is placed in the second section after the TOC, then use |section=2:
{{Expand section|section=2|{{subst:DATE}}}}
results in:
and links to the edit screen for the second section of the page after the TOC.


1=, with=, or for=
An unnamed parameter, |1= (or one of the named parameters, |with= or |for=), may be used to explain what expansion is needed in the section:
{{Expand section|1=examples and additional citations|section=1|date=December 2025}}
results in:
When multiple expansion issues need to be raised, explain them in a new section on the article's discussion page, and use the next two parameters for reader convenience.


small= and talksection=
The default for the |small= parameter is "yes", which means that if this parameter is omitted, then the size of the tag will default to the sizes shown above. Use |small=no to result in a larger section tag and to enable the |talksection= parameter (|talk= or |discuss= may also be used):
{{Expand section|1=examples and additional citations|section=1|date=December 2025|small=no|talksection=Template talk:Expand section#When should this template be used?}}
results in:

Categorisation

When {{Expand section}} is used without a |date= parameter in an article in the main article namespace, the article is sorted to Category:Articles to be expanded. A bot or an editor will then add the date parameter, and the article will be sorted to a category with a name that reflects the date given. For example, if the |date=December 2025 is used, the article will be added to Category:Articles to be expanded from December 2025.

No matter what parameters are used with this template, it also adds the article to Category:All articles to be expanded.

Choosing the right template

For an empty section

If the section is completely empty, the {{Empty section}} template should be used instead of this template.

The exception would be an empty section used for references as explained in the following subsection.

For a References or Notes section

When the section that needs expansion is used to list cited sources, then either {{No footnotes}} or {{More footnotes needed}} should be used instead of {{Empty section}} or {{Expand section}}.

Note: Unlike the other templates mentioned, those "footnotes" templates should go at the beginning/TOP of the page, just under any hatnotes, rather than at the beginning of a section.

In the main article namespace, citing sources is an important part of the article, performed by using the tags, <ref></ref>, which in turn are collected and formatted into text in the section containing the {{Reflist}} template or the <references /> tag. This section (or sub-section, as might be the case if the sources are listed separately) is often titled "References", and can have other names.

If the article has a section that contains either {{Reflist}} or <references />, the section can still appear blank on the saved, rendered page if the article has no text within <ref></ref> tags. Such a section is still considered blank, even though the template or tag wikitext can be seen in Edit mode. In that case the {{No footnotes}} template should be used at the TOP of the page just beneath any hatnotes.

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for Expand section

Can be placed at the beginning of article sections that need expansion, after the section title.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Reason1 with for

Reason the template was added, an explanation of what expansion the section needs. A bulleted list with lines beginning '*' can be given.

Contentoptional
Terminal punctuationperiod punctuation

If set to 'no', this parameter omits the terminal punctuation after the input for the 'with'/'for' parameter (i.e., the reason the template was added); this is normally only used if references are included after terminal punctuation.

Default
yes
Example
no
Auto value
Booleanoptional
Talk sectiontalksection discuss talk

A section heading in the talk page where the issue is discussed. Note: The talksection parameter only displays if the parameter small is set to 'no'.

Stringoptional
Month and yeardate

The month and year the template was added, e.g. 'July 2017'.

Auto value
{{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}
Stringsuggested
Smallsmall

By default the template will be displayed in a small size. This can be changed by setting small to no. Not recommended in articles.

Default
yes
Example
no
Auto value
Booleanoptional
Sectionsection

Section number of the section with the template

Numberoptional

See also