Jump to content

Template:Expand section/doc: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
m Usage: other options
Undid revision 1263055641 by 41.113.129.28 (talk): test edit
 
(37 intermediate revisions by 19 users not shown)
Line 1: Line 1:
{{documentation subpage}}
<noinclude>{{inuse}}
{{high-use| ≈ 33290 }}
</noinclude>{{documentation subpage}}

{{high-use| 32343 }}
This template may be used at the beginning of article sections that need expansion.


== Usage ==
== 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.
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.


{{plainlist|1=
{{As of |2016|August}}, this template only uses the "article message box" (Ambox) style; this will be fixed in the future.
*{{tlc|Expand section}}
*{{tlc|Expand section|date{{=}}{{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}
*{{tlc|Expand section|small{{=}}no}}
*{{tlc|Expand section|with{{=}}more details about early life|talk{{=}}Early life|small{{=}}no}}
*{{tlc|Expand section|small{{=}}no|find{{=}}search keywords}}
}}


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


<syntaxhighlight lang="wikitext">
Note: {{tl|sect-stub}} is a shortcut used for consistency with [[Template:Stub|other]] [[Template:Cleanup|cleanup]] [[Template:Cleanup section|templates]].

<pre>
{{Expand section
{{Expand section
| 1 = (or with= or for=)
| 1 = (or with= or for=)
Line 19: Line 24:
| talksection = (link with NO brackets, "[[]]"; displays only if small=no)
| talksection = (link with NO brackets, "[[]]"; displays only if small=no)
| date = Month YYYY
| 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)
}}
}}
</syntaxhighlight>
</pre>


==Parameters==
'''or inline short form'''


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


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

* {{para|1|''what and why''}}{{snd}} (or with= or for=) add a few words about what needs expansion and why
* {{para|small|no}} {{snd}} (default when omitted: a small message box flush left){{efn|name="small"}}
* {{para|talksection|''Section name''}} {{snd}} (link with NO brackets, "[[]]"; displays only if small=no)
* {{para|date|{{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}
* {{para|find|your search keywords}} {{snd}} search terms for {{tl|find sources}} param 1 (double-quoted search). This optional parameter adds a set of links produced by the {{tl|find sources}} template to the output. If omitted, no "find sources" links are displayed. Details [[#Find parameters|below]].
* {{para|find2|additional search terms}} {{snd}} search keywords for {{tl|find sources}} param 2 (unquoted search).
* {{para|section}} {{snd}} (section number)
* {{para|period}} {{snd}} &lt;!--no--> (included after the input for "1=" from above by default - use this

=== Details ===

;small

When the {{para|small}} parameter is omitted, a small, left-justified message box is displayed. This can be overridden: use {{para|small}} with ''any value'' (such as <code>no</code>) to result in a wider message box.{{efn|name="small"|Note that any value for {{para|small}} results in a wide box, so, {{para|small|yes}} and {{para|small|no}} produce the same results: a wide box. This is due to the operation of [[Template:Ambox#small|Ambox]].}}

Use of the wider box with {{para|small|no}} also enables display of the {{para|talksection}} parameter. ({{para|talk}} or {{para|discuss}} may also be used). In most cases, display of "find sources" results will be easier to read in a wide box, but are permitted in the default, smaller box.

;date

The {{para|date}} parameter sorts the article into subcategories of [[:Category:Articles to be expanded]], allowing the oldest ones to be identified and dealt with first. You do not need to specify the date manually; a [[WP:Bots|bot]] will add it later automatically.

;find parameters

There are two 'find' parameters available to control the presentation and operation of the {{tl|find sources}} links optionally displayed by the template. The find parameters can be used to provide the search keywords of your choice to the {{tl|find sources}} links. Use:
* {{para|find}} to specify keywords for an exact search (double-quoted query); this corresponds to {{tl|find sources}} positional param one.
* {{para|find2}} to specify keywords for an unquoted search; this corresponds to {{tl|find sources}} param two.
If you want to display {{tl|find sources}} links in the box, but are not sure of what search keywords to use, try setting {{para|find|''Article title''}} and {{para|find2|''Section title''}}. If the article title is a long, [[WP:NDESC|descriptive title]] unlikely to generate good results as a long, double-quoted search query, try swapping the values of the two params.

==Examples==

'''or inline short form'''

{{tlx|Expand section |1{{=}}''what and why'' |small{{=}}'''no''' |talk{{=}}''Talk_section'' find{{=}}''Article title or search terms'' |find2{{=}}''Section title or more terms'' |section{{=}}''n'' |date{{=}}{{CURRENTMONTHNAME}} {{CURRENTYEAR}} }}


;date=
;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 time (see the [[#Categorisation|Categorisation]] section of this page for more information:
: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|date{{=}}{{CURRENTMONTHNAME}} {{CURRENTYEAR}} }}
:{{Tlx|Expand section|date{{=}}{{CURRENTMONTHNAME}} {{CURRENTYEAR}} }}
Line 67: Line 106:




;small= and talksection=
;small=


Specify {{para|small|no}} to generate a wide box, and enable param {{para|talksection}}.
: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):

;talksection=

Prerequisite: requires {{para|small|no}}, otherwise presence and values of {{para|talksection}} are ignored.


:{{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?}}
:{{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?}}
Line 93: Line 136:
=== For a References or Notes section ===
=== 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}} should be used instead of {{Tlx|Empty section}} or {{Tlx|Expand 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.
'''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.
Line 102: Line 145:


== TemplateData ==
== TemplateData ==
{{TemplateData header}}
{{TemplateDataHeader}}
<!-- Why no "reason" here for the param "reason"? This is very confusing. At the beginning, an example with "reason =" is given. --><templatedata>
<!-- Why no "reason" here for the param "reason"? This is very confusing. At the beginning, an example with "reason =" is given. --><templatedata>
{
{
Line 115: Line 158:
"with",
"with",
"for"
"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": "line",
"suggestedvalues": [
"yes",
"no"
],
"required": false,
"example": "no",
"default": "yes",
"aliases": [
"punctuation"
]
]
},
},
Line 120: Line 178:
"label": "Talk section",
"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'.",
"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",
"type": "line",
"required": false,
"required": false,
"aliases": [
"aliases": [
Line 129: Line 187:
"date": {
"date": {
"label": "Month and year",
"label": "Month and year",
"description": "The month and year the template was added, e.g. 'July 2017'.",
"description": "The month and year the template was added.",
"type": "string",
"type": "line",
"required": false,
"required": false,
"autovalue": "{{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}",
"autovalue": "{{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}",
"suggested": true
"suggested": true,
"example": "July 2017"
},
},
"small": {
"small": {
"label": "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.",
"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",
"type": "line",
"required": false,
"required": false,
"example": "no",
"suggestedvalues": [
"default": "yes",
"no"
]
"autovalue": ""
},
"find": {
"label": "Find",
"description": "Search keywords for double-quoted search to pass to 'find sources'.",
"required": false,
"example": "Article title",
"type": "line"
},
"find2": {
"label": "Find2",
"description": "Search keywords for unquoted search to pass to 'find sources'.",
"required": false,
"example": "Section title",
"type": "line"
},
"section": {
"description": "Section number of the section with the template",
"type": "number"
}
}
},
},
Line 150: Line 227:


== See also ==
== See also ==
* {{tlx|Clarify}} and {{tlx|Elucidate}} (both inline)
* {{tlx|Clarify}} and {{tlx|Explain}} (both inline)
* {{tlx|Expand list}}
* {{tlx|Incomplete list}}
* {{tlx|Empty section}}
* {{tlx|Empty section}}
* {{tlx|Incomplete}}
* {{tlx|Missing information}}
* {{tlx|Missing information}}


== Notes ==
<includeonly>
{{notelist}}

<includeonly>{{Sandbox other||


[[Category:Cleanup templates|{{PAGENAME}}]]
[[Category:Cleanup templates|{{PAGENAME}}]]
[[Category:Exclude in print]]
[[Category:Wikipedia section templates]]
[[Category:Wikipedia section templates]]


</includeonly>
}}</includeonly>

Latest revision as of 18:45, 15 December 2024

This template may be used at the beginning of article sections that need expansion.

Usage

[edit]

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.

  • {{Expand section}}
  • {{Expand section|date=December 2024}}
  • {{Expand section|small=no}}
  • {{Expand section|with=more details about early life|talk=Early life|small=no}}
  • {{Expand section|small=no|find=search keywords}}

Long form:

{{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)
}}

Parameters

[edit]

Overview

[edit]

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

  • |1=what and why – (or with= or for=) add a few words about what needs expansion and why
  • |small=no  – (default when omitted: a small message box flush left)[a]
  • |talksection=Section name  – (link with NO brackets, "[[]]"; displays only if small=no)
  • |date=December 2024
  • |find=your search keywords  – search terms for {{find sources}} param 1 (double-quoted search). This optional parameter adds a set of links produced by the {{find sources}} template to the output. If omitted, no "find sources" links are displayed. Details below.
  • |find2=additional search terms  – search keywords for {{find sources}} param 2 (unquoted search).
  • |section=  – (section number)
  • |period=  – <!--no--> (included after the input for "1=" from above by default - use this

Details

[edit]
small

When the |small= parameter is omitted, a small, left-justified message box is displayed. This can be overridden: use |small= with any value (such as no) to result in a wider message box.[a]

Use of the wider box with |small=no also enables display of the |talksection= parameter. (|talk= or |discuss= may also be used). In most cases, display of "find sources" results will be easier to read in a wide box, but are permitted in the default, smaller box.

date

The |date= parameter sorts the article into subcategories of Category:Articles to be expanded, allowing the oldest ones to be identified and dealt with first. You do not need to specify the date manually; a bot will add it later automatically.

find parameters

There are two 'find' parameters available to control the presentation and operation of the {{find sources}} links optionally displayed by the template. The find parameters can be used to provide the search keywords of your choice to the {{find sources}} links. Use:

  • |find= to specify keywords for an exact search (double-quoted query); this corresponds to {{find sources}} positional param one.
  • |find2= to specify keywords for an unquoted search; this corresponds to {{find sources}} param two.

If you want to display {{find sources}} links in the box, but are not sure of what search keywords to use, try setting |find=Article title and |find2=Section title. If the article title is a long, descriptive title unlikely to generate good results as a long, double-quoted search query, try swapping the values of the two params.

Examples

[edit]

or inline short form

{{Expand section|1=what and why|small=no|talk=Talk_section find=Article title or search terms|find2=Section title or more terms|section=n|date=December 2024}}

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 2024}}
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 2024}}
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=

Specify |small=no to generate a wide box, and enable param |talksection=.

talksection=

Prerequisite: requires |small=no, otherwise presence and values of |talksection= are ignored.

{{Expand section|1=examples and additional citations|section=1|date=December 2024|small=no|talksection=Template talk:Expand section#When should this template be used?}}
results in:

Categorisation

[edit]

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 2024 is used, the article will be added to Category:Articles to be expanded from December 2024.

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

[edit]

For an empty section

[edit]

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

[edit]

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

[edit]
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Expand section in articles based on its TemplateData.

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.

Suggested values
yes no
Default
yes
Example
no
Lineoptional
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'.

Lineoptional
Month and yeardate

The month and year the template was added.

Example
July 2017
Auto value
{{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}
Linesuggested
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.

Suggested values
no
Lineoptional
Findfind

Search keywords for double-quoted search to pass to 'find sources'.

Example
Article title
Lineoptional
Find2find2

Search keywords for unquoted search to pass to 'find sources'.

Example
Section title
Lineoptional
sectionsection

Section number of the section with the template

Numberoptional

See also

[edit]

Notes

[edit]
  1. ^ a b Note that any value for |small= results in a wide box, so, |small=yes and |small=no produce the same results: a wide box. This is due to the operation of Ambox.