Misplaced Pages

Template:Talk header/doc: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
< Template:Talk header Browse history interactively← Previous editContent deleted Content addedVisualWikitext
Revision as of 23:10, 6 November 2021 editMathglot (talk | contribs)Autopatrolled, Extended confirmed users, Page movers, Pending changes reviewers, Rollbackers, Template editors86,533 edits Bot notice: Tweak wording.← Previous edit Latest revision as of 04:16, 2 December 2024 edit undoLethargilistic (talk | contribs)Extended confirmed users7,718 editsmNo edit summary 
(189 intermediate revisions by 36 users not shown)
Line 1: Line 1:
{{Documentation subpage}} {{Documentation subpage}}
<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata --> <!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata -->
{{High-risk}} {{High-use}}
{{Never substitute}} {{Never substitute}}
{{Template shortcut|th|tph}}
{{notice|This template should be used only when a talk page requires it. There is no need to add this template to every talk page. '''Do not create a talk page that contains only this template.'''}}
{{Template redirect|Talk page|Talk page banner}}
{{Uses TemplateStyles|Template:Talk header/styles.css}}
{{Lua|Module:String2|Module:Check for unknown parameters|Module:Check for deprecated parameters}}
{{tsh|tph|clear=right}}
{{Uses TemplateStyles|Module:Message box/tmbox.css|Template:Talk header/styles.css}}


This ] is a signpost. It may be used on ] to attract commentary from inexperienced editors, or where there are high levels of debate from everyone. It provides: This ] is a signpost. It displays a talk page message box with four sections of content:
* Intro – a short introduction and appropriate links for newcomers * ] – a short introduction and appropriate links for newcomers
* Policies – a reminder of important policies for experienced Wikipedians * ] – a reminder of important policies for experienced users
* ] – a set of links to aid in ] for the article topic
* Archives – a list of links to the current talk page's archives, and a search box
* Find sources links – a set of links to aid in ] for the article topic * ] – a list of links to the current talk page's ], and a search box to search them
Portions of the standard boilerplate text may be modified with params that specify ].


== Usage == == Usage ==
<syntaxhighlight lang="wikitext">{{Talk header}}</syntaxhighlight>
; Basic
{{pre2|<nowiki>{{Talk header}}</nowiki>}}


To add this template to a talk page, just open an edit of the talk page, and put {{tlc|Talk header}} at the top of the page. To add this template to a talk page, just open an edit of the talk page, and put {{tc|Talk header}} at the top of the page.


By convention, this template goes at the very top of the talk page, above WikiProject templates and other talk-page banners. However, this is not an absolute rule, and editors should use common sense when deciding its placement. See also: {{section link|Misplaced Pages:Talk page layout|Lead (bannerspace)}}.
This template should be placed only where it's needed. Don't visit talk pages just to add this template, and don't place it on the talk pages of new articles. Talk pages that are frequently misused, that attract frequent or perpetual debate, articles often subject to controversy, and highly-visible or popular topics may be appropriate for this template.


=== Should this be added to every talk page? <span class="anchor" id="Unnecessary"></span>===
By convention, this template goes at the very top of the talk page, above WikiProject templates and other talk-page banners. However, this is not an absolute rule, and editors should use common sense when deciding its placement. See also: {{section link|WP:Talk page layout|Lead (bannerspace)}}.
There is no mandate to have this template appear on the {{NUMBEROFARTICLES}}+ potential talk pages. This template should not be indiscriminately added to pre-existing talk pages, especially not with bots. That said, the template should not be removed from talk pages simply because it is there.


For more information on this topic, see the ] for this template, including the talk archives{{efn|]}} and the ] logs.{{efn|See the top of the ] for the banner with links to previous TfDs.}}
In accordance with ], this template '''''should not be added to otherwise empty talk pages'''''. That changes the "discussion" tab at the top of the page from a "redlink" into a "bluelink", which may mislead people into thinking there is discussion.

For more information on this topic, see the ] for this template, including the talk archives and the ] logs.


== Parameters == == Parameters ==
<!--search_term3 and search_term4 left undocumented; see Talk for #Proposal: drop search_term3 and search_term4 -->
'''Full syntax{{snd}}Vertical''' '''Full syntax{{snd}}Vertical'''


<div style="border: thin solid lightgray; width:97%; text-align:left; background-color:#F8F9FA; word-wrap:break-word; white-space:pre; margin: 1em 1em 0 0.2em; padding:0 0 0 1em"><code> <div style="border: thin solid lightgray; width:97%; text-align:left; background-color:var(--background-color-interactive-subtle, f9f8fa); word-wrap:break-word; white-space:pre; margin: 1em 1em 0 0.2em; padding:0 0 0 1em">
<nowiki>{{</nowiki>talk header <code><nowiki>{{</nowiki>Talk header
|bottom= {{efn|name="bottom-yes"}} | bottom= {{efn|name="bottom-yes"}}
|disclaimer= {{efn|name="disclaimer-yes"}} | custom_header= {{efn|name="custom_header"}}
|custom_header= {{efn|name="custom_header"}} | wp= {{efn|name="wp-yes"}}
|wp= {{efn|name="wp-yes"}} | display_title= {{efn|name="display_title"}}
|display_title= {{efn|name="display_title"}} | arpol= {{efn|name="arpol-yes"}}
|arpol= {{efn|name="arpol-yes"}} | sc1= {{efn|name="shortcuts"}}
| sc2=
|sc1= {{efn|name="shortcuts"}}
|sc2= | sc3=
|sc3= | sc4=
|sc4= | sc5=
| demospace= {{efn|name="demospace"}}
|sc5=
| hide_find_sources= {{efn|name="hide_find_sources-yes"}}
|demospace=
|hide_find_sources= {{efn|name="hide_find_sources-yes"}} | search_term1= {{efn|name="search_term"}}
| search_term2=
|search= {{efn|name="search-no"}}
|search_term1= {{efn|name="search_term"}} | search-domain= {{efn|name="search-domain"}}
| noarchive= {{efn|name="noarchive-yes"}}
|search_term2=
| search= {{efn|name="search-no"}}
|search_term3=
|search_term4=
|noarchive= {{efn|name="noarchive-yes"}}
|age=
|bot=
|units=
|minthreadsleft=
<nowiki>}}</nowiki></code> <nowiki>}}</nowiki></code>
</div> </div>


'''Horizontal''' '''Horizontal'''

<syntaxhighlight lang=moin>
{{talk header |bottom= |disclaimer= |custom_header= |wp= |display_title= |arpol= |sc1= |sc2= |sc3= |sc4= |sc5= |demospace= |hide_find_sources= |search= |search_term1= |search_term2= |search_term3= |search_term4= |noarchive= |age= |bot= |units= |minthreadsleft= }} <code>{{((}}Talk header |bottom= |custom_header= |wp= |display_title= |arpol= |sc1= |sc2= |sc3= |sc4= |sc5= |demospace= |hide_find_sources= |search_term1= |search_term2= |search-domain= |noarchive= |search= }}</code>
</syntaxhighlight>


== Hiding the template == == Hiding the template ==
If you would prefer not to see this template on any talk page, you can hide it from your view. Note that this will hide page ] links and the archive search box as well if they are configured to be shown through this template. You'll need to have a ] to do this. A ] who prefers not to see this template on any talk page, may hide it from view. Note that this hides page ] links and the archive search box as well if they are configured to be shown through this template. You'll need to have ] to do this.


# Edit your ] page at ]. # Edit your ] page at ].
Line 71: Line 65:
# ]. # ].


To only hide the intro/newcomer links and talk page policies, but leave the find sources and archive sections visible, instead use the line:
== Parameters by functionality group ==
{{bi |left=1 |<code><nowiki>#talkheader tr:has(> td > .talkheader-body) { display:none; }</nowiki></code>}}


Portions of the template may be hidden for all viewers using a template parameter: see ] to hide the "find sources" links; see ] to hide the archive links.
This section describes parameters according to which functionality group they belong to. Each subsection below corresponds to one of the four main areas of functionality listed in the bullet items at the ].

== Parts of the header ==
This section describes the different parts of the header. Each subsection below corresponds to one of the four main areas of functionality listed in the bullet items at the ], and explains which parameters are available to modify their appearance.


=== Intro and newcomer links === === Intro and newcomer links ===
Basic tips for newcomers are boxed with a white background and appear top left, and includes starting a new section and how to get help. The intro links are displayed in the top left portion of the message box:
{{Tmbox
| style =
| image = none
| text =
<div style="border:thin solid #c0c090; height:7em; width:60%; background-color:white; margin:0 0 4em -0.6em; padding-top:1em">
* Put new text under old text. {{Strong|]}}
* New to Misplaced Pages? Welcome! ]; ].
</div>
}}
=== Policies ===


==== Talk page policies ====
Basic tips for newcomers are boxed with a white background and appear top left, and includes starting a new section, using tildes to sign their posts, and how to get help.
A bullet list of ], and ] and ] is included by default in the top right portion of the message box.


=== Article policies === ==== Article policies ====
In the article namespace only, a list of bulleted "Article policies" is included by default. It occupies part of the top right section of the message box, to the right of the talk page policies.
{{tmbox
| style =
| image = none
| text =
<table role="presentation">
<tr>
<td style="border:thin solid #c0c090; width:50%; background-color:white; margin:0 0 0 -0.6em">
&nbsp;
</td>
<td style="width:29%">
* ]
* ] and ]
* ]
* Seek ] if needed
</td>
<td style="width:21%; border-left:1px solid #c0c090">
<span style="margin-left:2em">'''Article policies'''</span>
* ]
* ]
* ]
</td>
</tr>
<tr style="height:4em">
<td>&nbsp;</td>
</tr>
</table>
}}
In ], the "Article policies" box is absent by default, but it may be added via {{para|arpol|yes}}. For example:


{{tlc|talk header |arpol{{=}}yes}}
In the article namespace only, a box of "Article policies" is included by default.


Note: {{para|arpol|no}} is an invalid setting, and has no effect on header display in any namespace. The article policies may be suppressed from view in all namespaces by adding <code>#talkheader .talkheader-policies{display:none}</code> to your common.css.
In non-article namespaces, the "Article policies" box can be added via {{para|arpol|yes}}. For example:


=== "Find sources" links ===
{{tlx|talk header |bottom=yes |arpol{{=}}yes |noarchive{{=}}yes |search{{=}}yes |User:$1 |User:$2 }}
For article Talk pages, a set of "find sources" links appears by default in the Talk header box. The default links correspond to the output of ]; see ] for an example. These links appear after the initial article policies and links for newcomers, and above the archiving section. For the article ], it looks like this:
{{General sources notice|Europe}}


==== Background ====
Note: {{para|arpol|no}} is an invalid setting, and has no effect on header display in any namespace.
There are several flavors of "find sources" links (medical, video, general) targeted to different search domains. The flavor of "find sources" links displayed in the Talk header depends on ] membership of the article and may correspond to one of these:
* {{tl|find medical sources}}{{snd}}for articles in the '''medical''' search domain
* {{tl|find video game sources}}{{snd}}for articles in the '''video game''' search domain
* {{tl|find general sources}}{{snd}}the default, for everything else, is the '''general''' domain.

The default search domain is "general", which is the large majority of all Talk pages, and displays the links found in template {{tl|find general sources}}. The search domain is determined automatically by the template, depending on the presence of the corresponding ]. If an article belongs to ], it is in the medical search domain by default; if it belongs to ], it is in the video game search domain by default. (If it is in both, then the highest domain in the list above is chosen; i.e, 'medical'.)

'''Example'''

For the page ], which belongs to ], it looks like this:
{{medical sources notice|giardiasis}}
You can modify the nature of the source links displayed by ], ], or by ].

==== Hiding the links ====
By default, these links do not appear outside of ] (ns=1).

Within article Talk space, the "find sources" links may be suppressed by setting parameter {{para|hide_find_sources|yes}}.

==== Modifying the "find sources" query terms ====
The find sources links use the article title by default as the search term and forms an "exact search" (or "double-quoted query"){{efn|name="exact search"|'''Exact search''' is also known as a "double-quoted query" because major search engines interpret paired double-quote characters as indicating that everything between the double quotes must be found exactly as specified.}} from the title. If the article title contains ] portion, this is appended after the exact search query term, as an additional, unquoted phrase.

In place of the default, the query terms may be specified by using {{para|search_term}} (alias: {{para|search_term1}}) to specify the exact search string. Parameter {{para|search_term2}} may be added to specify additional, unquoted query terms, as many as desired.

==== Search domain override ====
The default domain chosen by automatic WikiProject detection may be overridden using param {{para|search-domain}}:
* {{para|search-domain|medical}}{{snd}}use {{pval|medical}} as the search domain, regardless what projects it belongs to (value alias: {{pval|med}})
* {{para|search-domain|video game}}{{snd}}use {{pval|video games}} as the search domain, regardless what projects it belongs to (value alias: {{pval|video}}, and {{pval|vg}}))
* {{para|search-domain|general}}{{snd}}use {{pval|general}} as the search domain, regardless what projects it belongs to (value alias: {{pval|gen}})

The parameter alias {{para|domain}} may be used instead; thus, {{para|domain|med}} means the same thing as {{para|search-domain|medical}}.


=== Archives === === Archives ===
The ] section of the Talk header occupies the bottom of the Talk header box. It consists of (up to) three portions:
* a set of ]
* archive bot notice
* an ]
The first and last portions are displayed automatically at the bottom of this template when used on a talk page that has archives that are ]. If no archives exist for the current talk page, or if they have non-standard names, no archive links or search box is displayed. The archive bot notice is only displayed if parameters are manually added.

Parameters {{para|noarchive|yes}} and {{para|search|no}} are available to suppress the links to Talk archive pages and to the search box. There can be an automatic ] adjacent to the archive links.

Setting up archiving on a Talk page is independent of the Talk page header. Pages can be set up to be automatically archived by a bot (typically by ] or ]); see ] for how to do this.


==== Links to archives ==== ==== Links to archives ====
If Talk page archives exist and are named in the ], using either a numeric sequence or the alphabetic system with names like /Archive A, or with yearly archives of the format /Archive {{CURRENTYEAR}}, links to all of the archive pages are displayed. If this template cannot find any archives because they are not named the standard sequential way, it will behave as if no archive pages exist.


{{para|noarchive|yes}} suppresses links to archives.
If present, archive index and links to archives look like this (example shown is for ]):


For archives using numeric sequencing, the archive links look like this (example shown is for ]):
{{Tmbox
{{tmbox
| small = {{{small|}}} | small = {{{small|}}}
| image = none | image = none
| style = text-align: center | style = text-align: center
| text =<span style="float:right">{{Tooltip|Auto-archiving period|Discussions with timestamps are automatically archived by Lowercase Sigmabot III after 180 days of inactivity.}} '''180 days'''&nbsp;]</span> | text =<span style="float:right">{{Tooltip|Auto-archiving period|Discussions with timestamps are automatically archived by Lowercase sigmabot III after 180 days of inactivity.}} '''180 days'''&nbsp;]</span>
]: ], ], ], ], ], ], ], ], ], ], ], ]}} ]: ], ], ], ], ], ], ], ], ], ], ], ]}}
A link to the archive index is included in the list if it exists and has the standard name "/Archive index". There is no parameter to independently suppress this.


==== Bot notice ==== ====Archive bot notice====


The talk header offers an archive bot notice containing the text "Auto-archiving period" at the right for informational purposes. It does not set up automatic archiving, it merely reports what type of archiving has been set up, if any. For instructions on how to configure Talk page archiving, see ]. If archiving has been set up, it is reported automatically from the archive configuration data on the page. An example is given just above, showing an archiving period of 180 days.
If the page is auto-archived by a bot, the bot notice appears to the right of the archive index links, as in the example shown above.


For archiving bots that use hours as the default units, values over 23 are converted to days, rounded to the nearest half-day, so that a config parameter of {{para|age|4320}} for such a bot will result in the same 180-day example as shown above. In these cases, the tooltip pop-up value remains denominated in hours.
The following parameters contribute to a small notification that the talk page is archived by a bot (typically by ] or ]). The template will include a tooltip informing readers of the amount of time before discussions are archived. This tooltip will not be shown if there are no archives to be listed.


'''Note:''' Formerly, four parameters were available for users to configure the bot notice manually; however, the bot notice is now generated automatically directly from the archive config data. The four parameters are therefore no longer required, and should not be used.
{{tlx|talk header|bot{{=}}lowercase sigmabot III|age{{=}}30|units{{=}}days}}


==== Search box ====
This informs the user the lowercase sigmabot III bot will autoarchive talk page sections that are older than 30 days. (See ].)
The archive search box may be used to search the Talk page archives, and is displayed automatically at the bottom of this template just below the ], when used on a talk page that has archives that are ]. If no archives exist for the current talk page, or if they have non-standard names, no search box is displayed.


Parameter {{para|search|no}} may be used to suppress the search box and the archive links.
{{tlx|talk header|bot{{=}}lowercase sigmabot III|age{{=}}6|units{{=}}months|minthreadsleft{{=}}4}}


If present, the search box appears below the ], and is the last element to appear in the template:
This informs the user the lowercase sigmabot III bot will autoarchive talk page sections that are older than 6 months, as long as at least 4 sections remain. (See ].)


{{tmbox
These parameters are for informational purposes, not to actually set up archiving. Please see ] for instructions. For an alternative template to inform readers of automatic archiving settings, see {{tl|Archives}}.
| small = {{{small|}}}
| image = none
| style = text-align: center
| text ={{Search box|root=Talk:Europe|search-break=no|search-width=auto|search-button-label=Search archives}}
}}
In this working example, entering search terms searches the talk page archives of the article ].


==== Suppressing links or search box ====
'''{{para|bot}}'''
By default, the Talk header template displays a list of ], if any archives are present. Parameter {{para|noarchive|yes}} may be used to suppress the list.
The bot used to archive the page, unwikilinked.


By default, the template displays an ] if any archives are present. Parameter {{para|search|no}} may be used to suppress display of the archive search box. Note that, in particular {{para|search|yes}} has no effect, and will not place a search box on a talk page that has no archives.
'''{{para|age}}'''
Enter a number to convey the amount of time the bot is set to wait for until archiving a discussion as expressed as a number of time units, as set by the <code>units</code> parameter.


== Additional and replacement text ==
'''{{para|units}}'''
Besides the four main sections of the talk header box, the template provides three parameters which may be used to include additional sections or modified text:
Enter a string to convey the unit the <code>age</code> parameter refers to. Useful examples include days, month, months etc
* {{para|bottom}}

'''{{para|minthreadsleft}}''' * {{para|custom header}}
* {{para|wp}}.
The amount of threads the bot will leave. The tooltip will include a message telling the reader that after <code>minthreadsleft</code> threads, threads older than <code>age</code> will be archived.

==== Search box ====


=== bottom ===
If present, the search box appears below the Archiving links:
'''{{para|bottom|yes}}'''{{snd}}adds a message above the main talk header box, separately bordered, about where to place new discussions:

{{Tmbox {{tmbox
| small = {{{small|}}} | small = {{{small|}}}
| image = none | image = none
| style = text-align: center | style = text-align: center
| text = '''Please place new discussions at the bottom of the talk page.'''
| text ={{Search box|root=Talk:Europe|search-break=no|search-width=auto|search-button-label=Search archives}}}}
}}


=== custom_header ===
In this working example, entering search terms searches the talk page archives of the article ].
'''{{para|custom_header|your text here}}'''{{snd}}adds any desired text above the main talk header. Text is in boldface by default, and has a horizontal rule below, separating it from the rest of the content.


'''Example'''
=== "Find sources" links ===


Showing {{para|custom_header}} with the first line of ] text:
For article Talk pages, a set of "find sources" links appears by default in the Talk header box. The default links correspond to the output of ]; see ] for an example.
{{tmbox
| style = border-bottom:none
| image = none
| text =
'''Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.'''{{hr}}
<table>
<tr>
<td style="border:thin solid #c0c090; border-bottom:none; width:60%; background-color:white; margin:0 0 4em -0.6em; padding:0 1em 0 0">
* Put new text under old text. {{Strong|]}}
</td>
<td>
* ]
</td>
</tr>
</table>
}}


If used together with {{para|bottom}}: the "New discussions placement" text appears above everything in a separately bordered box; the main talk header box is below that, and the custom text appears in the main box, above the ] and ] links and separated from them by a horizontal rule.
In article Talk space, the "find sources" links may be suppressed by setting the {{para|hide_find_sources|yes}} parameter. These links do not appear outside of Talk space.

=== wp ===
'''{{para|wp|yes}}'''{{snd}}Extends the bolded lead sentence of the header, to add the words "''Pagename'' and anything related to its purposes and tasks" as follows:
{{tmbox
| small = {{{small|}}}
| image = none
| style = text-align: center
| text = '''This is the talk page for discussing ''Pagename'' and anything related to its purposes and tasks.'''
}}
This parameter should not be used outside of the ].


== Testing issues == == Testing issues ==


=== Namespace testing === === Find sources testing ===
For testing and demonstration purposes, this template can take a parameter named '''demospace''' which enables testing of the find sources opt-out parameter {{para|hide_find_sources}} from other namespaces. For testing and demonstration purposes, this template accepts parameter {{para|demospace}} which enables testing of the find sources opt-out parameter {{para|hide_find_sources}} from other namespaces.
* If <code>demospace</code> has the value '''main''' or the value '''1''' it returns the findsources text it would normally return when transcluded from ]. * If {{para|demospace}} has the value {{pval|main}} or the value {{pval|1}} it returns the findsources text it would normally return when transcluded from ].
* It <code>demospace</code> any other value such as the name of some other namespace it returns the text it would if transcluded outside of mainspace. * If {{para|demospace}} has any other value such as the name of some other namespace it returns the text it would if transcluded outside of mainspace.
* If the parameter is empty or undefined, the actual page type determines the result. * If the parameter is empty or undefined, the actual page type determines the result.


The dynamic features of ] and ] depend on the article title where it appears, and therefore cannot be tested in the normal way. The ] provides an explanation of ] using ] with the ContextTitle enabled, or by using ''in situ'' testing.
==Examples==

=== Archiving notice ===
The following parameters contribute to a small notification that the talk page is archived by a bot (typically by ] or ]). The template will include a tooltip informing readers of the amount of time before discussions are archived. This tooltip will not be shown if there are no archives to be listed.

{{nowiki template demo|code=<nowiki>{{talk header|bot=lowercase sigmabot III|age=30|units=days}}</nowiki>}}
This informs the user the lowercase sigmabot III bot will autoarchive talk page sections that are older than 30 days.


=== Expensive parser functions ===
{{nowiki template demo|code=<nowiki>{{talk header|bot=lowercase sigmabot III|age=6|units=months|minthreadsleft=4}}</nowiki>}}
This template uses up to {{#expr: {{CURRENTYEAR}} - 2002}} ] (during {{CURRENTYEAR}}, with it increasing by one a year) depending on what parameters are used. In theory, on pages with very large numbers of other templates using expensive parser functions this could result in ] being reached, but this is very unlikely. It could also affect expansion of templates on a test page that has more than {{#expr: trunc(500 / ( {{CURRENTYEAR}} - 2002 ))}} uncollapsed invocations of this template, especially ones appearing lower on the page.
This informs the user the lowercase sigmabot III bot will autoarchive talk page sections that are older than 6 months, as long as at least 4 sections remain.


==TemplateData== ==TemplateData==
Line 179: Line 288:
], ],
"label": "Shortcut", "label": "Shortcut",
"description": "Shortcut that will display similar to the {{shortcut}} template, but within the Talk header message box", "description": "Shortcut that displays similar to the {{shortcut}} template, but within the Talk header message box",
"example": "WP:SHOR", "example": "WP:SHOR",
"type": "wiki-page-name", "type": "wiki-page-name",
Line 191: Line 300:
"label": "Shortcut 2", "label": "Shortcut 2",
"description": "A second shortcut", "description": "A second shortcut",
"type": "wiki-page-name"
},
"3": {
"aliases": [
"shortcut3",
"sc3"
],
"label": "Shortcut 3",
"description": "A third shortcut",
"type": "wiki-page-name"
},
"4": {
"aliases": [
"shortcut4",
"sc4"
],
"label": "Shortcut 4",
"description": "A fourth shortcut",
"type": "wiki-page-name"
},
"5": {
"aliases": [
"shortcut5",
"sc5"
],
"label": "Shortcut 5",
"description": "A fifth shortcut",
"type": "wiki-page-name" "type": "wiki-page-name"
}, },
Line 226: Line 308:
"yes" "yes"
] ]
},
"small": {},
"disclaimer": {
"description": "Set to \"yes\" to add an additional banner which identifies the page as being originally from Misplaced Pages (and modify the width to suit), matching the style of {{User page}}.",
"type": "boolean"
}, },
"custom_header": { "custom_header": {
Line 253: Line 330:
"default": "On for article talk pages, off otherwise" "default": "On for article talk pages, off otherwise"
}, },
"demospace": {}, "demospace": {
"label": "demospace",
"description": "Namespace number or name for testing purposes",
"type": "string"
},
"hide_find_sources": { "hide_find_sources": {
"label": "Hide find sources?", "label": "Hide find sources?",
Line 267: Line 348:
"type": "string" "type": "string"
}, },
"search_term2": {}, "search_term2": {
"label": "Search term 2",
"search_term3": {},
"description": "Adds a second search term for unquoted search, as used in the {{find sources}} module",
"search_term4": {},
"type": "string"
},
"search-domain": {
"aliases": [
"domain"
],
"label": "Search domain",
"description": "Changes the default search domain used in the {{find sources}} module",
"suggestedvalues": [
"medical",
"video",
"general"
],
"type": "string"
},
"noarchive": { "noarchive": {
"aliases": [ "aliases": [
Line 277: Line 373:
"label": "No archives?", "label": "No archives?",
"description": "Set to \"yes\" to hide the archives links", "description": "Set to \"yes\" to hide the archives links",
"type": "boolean" "type": "boolean",
},
"archive_age": {
"aliases": [
"age"
],
"label": "Archive age",
"description": "Amount of time, by default in days, before discussions will be automatically archived. Note: Does not actually trigger automatic archiving; see ].",
"type": "number",
"suggested": true
},
"archive_bot": {
"aliases": [
"bot"
],
"label": "Archive bot",
"description": "The bot used to archive the page. Note: Does not actually trigger automatic archiving; see ].",
"suggestedvalues": [ "suggestedvalues": [
"Lowercase sigmabot III", "yes"
]
"ClueBot III"
],
"type": "string",
"suggested": true
},
"archive_units": {
"aliases": [
"units"
],
"label": "Archive units",
"description": "The units for archive_age",
"suggestedvalues": [
"hours",
"days",
"months",
"years"
],
"type": "string",
"default": "days"
},
"minthreadsleft": {
"label": "Minimum threads left",
"description": "The number of threads the archiving bot will leave. Currently affects only the tooltip.",
"type": "number",
"suggested": true
}, },
"search": { "search": {
"label": "Search",
"description": "Set to \"no\" to override the default behavior for the search box appearance", "description": "Set to \"no\" to override the default behavior for the search box appearance",
"type": "boolean" "type": "boolean"
Line 333: Line 390:
== Tracking categories == == Tracking categories ==
* {{Category link with count|Pages using Talk header with unknown parameters}} * {{Category link with count|Pages using Talk header with unknown parameters}}
* {{clc|Pages using Talk header with deprecated parameters}}


== See also == == See also ==
Line 347: Line 405:
{{notelist|refs= {{notelist|refs=


{{efn|name="arpol-yes"|To force inclusion of the "Article policies" section of the template in non-article namespaces where they are normally excluded, use {{para|arpol|yes}}. (See ] below for an example.)}}
{{efn|name="shortcuts"|Up to five ] can be added to the template, as ], or as named ones (any of {{para|1}}, {{para|sc}}, {{para|sc1}}, {{para|shortcut}} or {{para|shortcut1}}, then {{para|2}}, {{para|sc2}} or {{para|shortcut2}}, etc., will work). For example, {{tlx|Talk header|WP:SHOR|WP:TCUT}}. They will display similar to the {{tlx|shortcut}} template, but within the Talk header message box.}}

{{efn|name="bottom-yes"|Use {{para|bottom|yes}} to add additional instructions above the talk header box to "place new discussions at the bottom of the talk page"; see ].}}


{{efn|name="custom_header"|To add customized text in the talk header box, use {{para|custom_header|''Your custom text''}}; see ].}}
{{efn|name="wp-yes"|For use on WikiProject talk pages, the parameter {{para|wp|yes}} can be included to add "and anything related to its purposes and tasks." to the top line of the banner.}}


{{efn|name="demospace"|For additional information on {{para|demospace}} see ].}}
{{efn|name="noarchive-yes"|When used on a talk page that has archives, links to those archives and a search box will be displayed automatically within this template. To switch the archive links off, use the parameter {{para|noarchive|yes}}. For example: {{tlx|Talk header|2=noarchive=yes}}. ''For automatic archive links to be displayed, archives must be ]. A link to the archive index is also displayed, if it is named "/Archive index". If no archives exist for the current talk page, or if archives exist but possess non-standard names, no archive links will be displayed.''}}


{{efn|name="search-no"|To override the default behaviour for the search box appearance, use {{para|search|no}}. The default is ''yes'', when archive subpages exist.}} {{efn|name="display_title"|To display a custom page title, use {{para|display_title|''custom page title''}}.}}


{{efn|name="hide_find_sources-yes"|To hide "Find sources" on article talk pages, use {{para|hide_find_sources|yes}}. More details at ] and ] below.}}
{{efn|name="disclaimer-yes"|On user talk pages, {{para|disclaimer|yes}} adds an additional banner which identifies the page as being originally from Misplaced Pages (and modifies the width to suit), matching the style of {{tlx|User page}}.}}


{{efn|name="noarchive-yes"|Archive links and an archive search box are displayed automatically at the bottom of the template. Use parameter {{para|noarchive|yes}} to suppress display of the archive links and search box. See section ] below.}}
{{efn|name="arpol-yes"|"Article policies" can be added to talk headers in non-article namespaces by adding {{para|arpol|yes}}. (See below in ] for an example)}}


{{efn|name="search_term"|To override the article title as the default search used by ], use params {{para|search_term1}} and {{para|search_term2}}. Details at ] below.}}
{{efn|name="bottom-yes"|To add additional instructions at the top to "please place new discussions at the bottom of the talk page", use {{para|bottom|yes}}.}}


{{efn|name="search-domain"|To override the search domain chosen automatically by the template, use {{para|search-domain|''domain value''}}. See details at ].}}
{{efn|name="hide_find_sources-yes"|To hide "Find sources" on article talk pages, use {{para|hide_find_sources|yes}}}}


{{efn|name="search_term"|To change the search term from the page name, use {{para|search_term|''new search term''}}}} {{efn|name="search-no"|To suppress the archive search box from the template, use {{para|search|no}}; see section ] for details.}}


{{efn|name="shortcuts"|Up to five ] may be added to the template, as ], or as named ones (any of {{para|1}}, {{para|sc}}, {{para|sc1}}, {{para|shortcut}} or {{para|shortcut1}}, then {{para|2}}, {{para|sc2}} or {{para|shortcut2}}, etc., work). For example, {{tlx|Talk header|WP:SHOR|WP:TCUT}}. They display similar to the {{tlx|shortcut}} template, but within the Talk header message box.}}
{{efn|name="display_title"|To display a custom page title, use {{para|display_title|''custom page title''}}}}


{{efn|name="wp-yes"|Designed for use on project (]) talk pages, parameter {{para|wp|yes}} may be used to alter the intro line of the banner ("This is the talk page for...") in order to add "and anything related to its purposes and tasks". Details ].}}
{{efn|name="custom_header"|To replace the entire header with customized text, use {{para|custom_header|''Custom header text goes here''}}}}


}} }}
Line 373: Line 433:
{{Userspace disclaimers}} {{Userspace disclaimers}}
{{Templates for archiving}} {{Templates for archiving}}
{{Talk header templates}}


<includeonly>{{Sandbox other|| <includeonly>{{Sandbox other||

Latest revision as of 04:16, 2 December 2024

This is a documentation subpage for Template:Talk header.
It may contain usage information, categories and other content that is not part of the original template page.
WarningThis template is used on approximately 738,000 pages, or roughly 1% of all pages.
To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them.
This template should not be substituted.
Shortcuts Redirects
This template uses Lua:
CSSThis template uses TemplateStyles:

This template is a signpost. It displays a talk page message box with four sections of content:

Portions of the standard boilerplate text may be modified with params that specify additional or replacement text.

Usage

{{Talk header}}

To add this template to a talk page, just open an edit of the talk page, and put {{Talk header}} at the top of the page.

By convention, this template goes at the very top of the talk page, above WikiProject templates and other talk-page banners. However, this is not an absolute rule, and editors should use common sense when deciding its placement. See also: Misplaced Pages:Talk page layout § Lead (bannerspace).

Should this be added to every talk page?

There is no mandate to have this template appear on the 6,933,969+ potential talk pages. This template should not be indiscriminately added to pre-existing talk pages, especially not with bots. That said, the template should not be removed from talk pages simply because it is there.

For more information on this topic, see the talk page for this template, including the talk archives and the TfD logs.

Parameters

Full syntax – Vertical

{{Talk header | bottom= | custom_header= | wp= | display_title= | arpol= | sc1= | sc2= | sc3= | sc4= | sc5= | demospace= | hide_find_sources= | search_term1= | search_term2= | search-domain= | noarchive= | search= }}

Horizontal

{{Talk header |bottom= |custom_header= |wp= |display_title= |arpol= |sc1= |sc2= |sc3= |sc4= |sc5= |demospace= |hide_find_sources= |search_term1= |search_term2= |search-domain= |noarchive= |search= }}

Hiding the template

A registered user who prefers not to see this template on any talk page, may hide it from view. Note that this hides page archive links and the archive search box as well if they are configured to be shown through this template. You'll need to have an account to do this.

  1. Edit your user style page at Special:Mypage/common.css.
  2. Add a line: #talkheader {display:none;}
  3. Save the change.
  4. Bypass your cache.

To only hide the intro/newcomer links and talk page policies, but leave the find sources and archive sections visible, instead use the line:

#talkheader tr:has(> td > .talkheader-body) { display:none; }

Portions of the template may be hidden for all viewers using a template parameter: see here to hide the "find sources" links; see here to hide the archive links.

Parts of the header

This section describes the different parts of the header. Each subsection below corresponds to one of the four main areas of functionality listed in the bullet items at the top, and explains which parameters are available to modify their appearance.

Intro and newcomer links

Basic tips for newcomers are boxed with a white background and appear top left, and includes starting a new section and how to get help. The intro links are displayed in the top left portion of the message box:

Policies

Talk page policies

A bullet list of policies, and behavioral and talk page guidelines is included by default in the top right portion of the message box.

Article policies

In the article namespace only, a list of bulleted "Article policies" is included by default. It occupies part of the top right section of the message box, to the right of the talk page policies.

 

Article policies

 

In non-article namespaces, the "Article policies" box is absent by default, but it may be added via |arpol=yes. For example:

{{talk header|arpol=yes}}

Note: |arpol=no is an invalid setting, and has no effect on header display in any namespace. The article policies may be suppressed from view in all namespaces by adding #talkheader .talkheader-policies{display:none} to your common.css.

"Find sources" links

For article Talk pages, a set of "find sources" links appears by default in the Talk header box. The default links correspond to the output of Template:Find sources; see Talk:Europe for an example. These links appear after the initial article policies and links for newcomers, and above the archiving section. For the article Europe, it looks like this:

Find sources: Google (books · news · scholar · free images · WP refs· FENS · JSTOR · TWL

Background

There are several flavors of "find sources" links (medical, video, general) targeted to different search domains. The flavor of "find sources" links displayed in the Talk header depends on WikiProject membership of the article and may correspond to one of these:

The default search domain is "general", which is the large majority of all Talk pages, and displays the links found in template {{find general sources}}. The search domain is determined automatically by the template, depending on the presence of the corresponding WikiProject. If an article belongs to WikiProject Medicine, it is in the medical search domain by default; if it belongs to WikiProject Video games, it is in the video game search domain by default. (If it is in both, then the highest domain in the list above is chosen; i.e, 'medical'.)

Example

For the page Talk:Giardiasis, which belongs to WP:WikiProject Medicine, it looks like this:

Find medical sourcesFind medical sources: Source guidelines · PubMed · Cochrane · DOAJ · Gale · OpenMD · ScienceDirect · Springer · Trip · Wiley · TWL

You can modify the nature of the source links displayed by § Hiding the links, § modifying the query terms, or by § modifying the search domain.

Hiding the links

By default, these links do not appear outside of article Talk space (ns=1).

Within article Talk space, the "find sources" links may be suppressed by setting parameter |hide_find_sources=yes.

Modifying the "find sources" query terms

The find sources links use the article title by default as the search term and forms an "exact search" (or "double-quoted query") from the title. If the article title contains parenthetical disambiguation portion, this is appended after the exact search query term, as an additional, unquoted phrase.

In place of the default, the query terms may be specified by using |search_term= (alias: |search_term1=) to specify the exact search string. Parameter |search_term2= may be added to specify additional, unquoted query terms, as many as desired.

Search domain override

The default domain chosen by automatic WikiProject detection may be overridden using param |search-domain=:

  • |search-domain=medical – use medical as the search domain, regardless what projects it belongs to (value alias: med)
  • |search-domain=video game – use video games as the search domain, regardless what projects it belongs to (value alias: video, and vg))
  • |search-domain=general – use general as the search domain, regardless what projects it belongs to (value alias: gen)

The parameter alias |domain= may be used instead; thus, |domain=med means the same thing as |search-domain=medical.

Archives

The archives section of the Talk header occupies the bottom of the Talk header box. It consists of (up to) three portions:

The first and last portions are displayed automatically at the bottom of this template when used on a talk page that has archives that are named in the standard way. If no archives exist for the current talk page, or if they have non-standard names, no archive links or search box is displayed. The archive bot notice is only displayed if parameters are manually added.

Parameters |noarchive=yes and |search=no are available to suppress the links to Talk archive pages and to the search box. There can be an automatic § archive bot notice adjacent to the archive links.

Setting up archiving on a Talk page is independent of the Talk page header. Pages can be set up to be automatically archived by a bot (typically by Lowercase sigmabot III or ClueBot III); see Help:Archiving a talk page for how to do this.

Links to archives

If Talk page archives exist and are named in the standard sequential way, using either a numeric sequence or the alphabetic system with names like /Archive A, or with yearly archives of the format /Archive 2025, links to all of the archive pages are displayed. If this template cannot find any archives because they are not named the standard sequential way, it will behave as if no archive pages exist.

|noarchive=yes suppresses links to archives.

For archives using numeric sequencing, the archive links look like this (example shown is for Talk:Europe):

Auto-archiving period 180 days  Archives: Index, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11

A link to the archive index is included in the list if it exists and has the standard name "/Archive index". There is no parameter to independently suppress this.

Archive bot notice

The talk header offers an archive bot notice containing the text "Auto-archiving period" at the right for informational purposes. It does not set up automatic archiving, it merely reports what type of archiving has been set up, if any. For instructions on how to configure Talk page archiving, see Help:Archiving a talk page. If archiving has been set up, it is reported automatically from the archive configuration data on the page. An example is given just above, showing an archiving period of 180 days.

For archiving bots that use hours as the default units, values over 23 are converted to days, rounded to the nearest half-day, so that a config parameter of |age=4320 for such a bot will result in the same 180-day example as shown above. In these cases, the tooltip pop-up value remains denominated in hours.

Note: Formerly, four parameters were available for users to configure the bot notice manually; however, the bot notice is now generated automatically directly from the archive config data. The four parameters are therefore no longer required, and should not be used.

Search box

The archive search box may be used to search the Talk page archives, and is displayed automatically at the bottom of this template just below the archive page links, when used on a talk page that has archives that are named in the standard way. If no archives exist for the current talk page, or if they have non-standard names, no search box is displayed.

Parameter |search=no may be used to suppress the search box and the archive links.

If present, the search box appears below the Archiving links, and is the last element to appear in the template:

In this working example, entering search terms searches the talk page archives of the article Europe.

Suppressing links or search box

By default, the Talk header template displays a list of archive links, if any archives are present. Parameter |noarchive=yes may be used to suppress the list.

By default, the template displays an archive search box if any archives are present. Parameter |search=no may be used to suppress display of the archive search box. Note that, in particular |search=yes has no effect, and will not place a search box on a talk page that has no archives.

Additional and replacement text

Besides the four main sections of the talk header box, the template provides three parameters which may be used to include additional sections or modified text:

  • |bottom=
  • |custom header=
  • |wp=.

bottom

|bottom=yes – adds a message above the main talk header box, separately bordered, about where to place new discussions:

Please place new discussions at the bottom of the talk page.

custom_header

|custom_header=your text here – adds any desired text above the main talk header. Text is in boldface by default, and has a horizontal rule below, separating it from the rest of the content.

Example

Showing |custom_header= with the first line of Lorem ipsum text:

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

If used together with |bottom=: the "New discussions placement" text appears above everything in a separately bordered box; the main talk header box is below that, and the custom text appears in the main box, above the newbie and article policy links and separated from them by a horizontal rule.

wp

|wp=yes – Extends the bolded lead sentence of the header, to add the words "Pagename and anything related to its purposes and tasks" as follows:

This is the talk page for discussing Pagename and anything related to its purposes and tasks.

This parameter should not be used outside of the Misplaced Pages talk namespace.

Testing issues

Find sources testing

For testing and demonstration purposes, this template accepts parameter |demospace= which enables testing of the find sources opt-out parameter |hide_find_sources= from other namespaces.

  • If |demospace= has the value main or the value 1 it returns the findsources text it would normally return when transcluded from mainspace.
  • If |demospace= has any other value such as the name of some other namespace it returns the text it would if transcluded outside of mainspace.
  • If the parameter is empty or undefined, the actual page type determines the result.

The dynamic features of WikiProject autodetection and § Search domain override depend on the article title where it appears, and therefore cannot be tested in the normal way. The test cases page provides an explanation of how to test these features using Special:ExpandTemplates with the ContextTitle enabled, or by using in situ testing.

Expensive parser functions

This template uses up to 23 expensive parser functions (during 2025, with it increasing by one a year) depending on what parameters are used. In theory, on pages with very large numbers of other templates using expensive parser functions this could result in template limits being reached, but this is very unlikely. It could also affect expansion of templates on a test page that has more than 21 uncollapsed invocations of this template, especially ones appearing lower on the page.

TemplateData

A signpost for the top of talk pages

Template parameters

ParameterDescriptionTypeStatus
Shortcut1 shortcut shortcut1 sc sc1

Shortcut that displays similar to the {{shortcut}} template, but within the Talk header message box

Example
WP:SHOR
Page namesuggested
Shortcut 22 shortcut2 sc2

A second shortcut

Page nameoptional
bottombottom

Set to "yes" to add additional instructions at the top to "please place new discussions at the bottom of the talk page"

Suggested values
yes
Booleanoptional
Custom headercustom_header

Replaces the entire header with customized text

Lineoptional
WikiProject?wp

For use on WikiProject talk pages; set to "yes" to add "and anything related to its purposes and tasks" to the header

Booleanoptional
Display titledisplay_title

Displays a custom page title

Stringoptional
Article policiesarpol

Adds a link to the article policy pages

Default
On for article talk pages, off otherwise
Booleanoptional
demospacedemospace

Namespace number or name for testing purposes

Stringoptional
Hide find sources?hide_find_sources

Set to "yes" to hide the find sources banner on article talk pages

Booleanoptional
Search termsearch_term search_term1

Changes the search term used in the {{find sources}} module

Stringoptional
Search term 2search_term2

Adds a second search term for unquoted search, as used in the {{find sources}} module

Stringoptional
Search domainsearch-domain domain

Changes the default search domain used in the {{find sources}} module

Suggested values
medical video general
Stringoptional
No archives?noarchive noarchives archives

Set to "yes" to hide the archives links

Suggested values
yes
Booleanoptional
Searchsearch

Set to "no" to override the default behavior for the search box appearance

Booleanoptional

Tracking categories

See also

Notes

  1. Template talk:Talk header/Archive 10#Consider updating the "only where it's needed" instruction
  2. See the top of the talk page for the banner with links to previous TfDs.
  3. Use |bottom=yes to add additional instructions above the talk header box to "place new discussions at the bottom of the talk page"; see details here.
  4. To add customized text in the talk header box, use |custom_header=Your custom text; see details here.
  5. Designed for use on project (Misplaced Pages namespace) talk pages, parameter |wp=yes may be used to alter the intro line of the banner ("This is the talk page for...") in order to add "and anything related to its purposes and tasks". Details here.
  6. To display a custom page title, use |display_title=custom page title.
  7. To force inclusion of the "Article policies" section of the template in non-article namespaces where they are normally excluded, use |arpol=yes. (See § Article policies below for an example.)
  8. Up to five shortcuts may be added to the template, as unnamed parameters, or as named ones (any of |1=, |sc=, |sc1=, |shortcut= or |shortcut1=, then |2=, |sc2= or |shortcut2=, etc., work). For example, {{Talk header|WP:SHOR|WP:TCUT}}. They display similar to the {{shortcut}} template, but within the Talk header message box.
  9. For additional information on |demospace= see § Testing issues.
  10. To hide "Find sources" on article talk pages, use |hide_find_sources=yes. More details at § "Find sources" links and § Testing issues below.
  11. To override the article title as the default search used by § "Find sources" links, use params |search_term1= and |search_term2=. Details at § Modifying the "find sources" query terms below.
  12. To override the search domain chosen automatically by the template, use |search-domain=domain value. See details at § Search domain override.
  13. Archive links and an archive search box are displayed automatically at the bottom of the template. Use parameter |noarchive=yes to suppress display of the archive links and search box. See section § Archives below.
  14. To suppress the archive search box from the template, use |search=no; see section § Search box for details.
  15. Exact search is also known as a "double-quoted query" because major search engines interpret paired double-quote characters as indicating that everything between the double quotes must be found exactly as specified.
Userspace messages and disclaimers
User pages
User talk pages
Editnotices
Drafts and sandboxes
Blanking
Templates for archiving
Recommended
Side box
Headers
With
navigation
Without
navigation
With
search
  • {{Talk header}} (contains an automatically appearing archive search box and nav)
Content
formatting
Lists
Discussion
Automatic
archiving
systems
Talk header templates
Popular
Notice and
Warnings
General
Severe
BLP/COI
Custom
Informative
Processes
 Category:Talk header templates