Template:Talk header/doc

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.
 * § Intro – a short introduction and appropriate links for newcomers
 * § Policies – a reminder of important policies for experienced users
 * § "Find sources links" – a set of links to aid in finding reliable sources for the article topic
 * § Archives – a list of links to the current talk page's archives, and a search box to search them

Usage

 * Basic

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

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.

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:.

In accordance with talk page guidelines, 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 talk page for this template, including the talk archives and the TfD logs.

Parameters
Full syntax – Vertical



Horizontal

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:
 * 3) Save the change.
 * 4) Bypass your cache.

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, using tildes to sign their posts, and how to get help. The intro links are displayed in the top left portion of the message box:

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.

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

Note: 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  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:

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:
 * find medical sources – for articles in the medical search domain
 * find video game sources – for articles in the video game search domain
 * find general sources – 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 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'.)

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

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 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:
 * medical – use as the search domain, regardless what projects it belongs to (value alias: )
 * video game – use as the search domain, regardless what projects it belongs to (value alias:, and ))
 * general – use as the search domain, regardless what projects it belongs to (value alias: )

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

Archives
The archives section of the Talk header occupies the bottom of the Talk header box. It consists of two portions: These 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.
 * a set of links to Talk page archives
 * an archive search box

Parameters yes and no are available to suppress the links to Talk archive pages and to the search box. Four additional parameters are available to add an optional § archive bot notice adjacent to the archive links and to control its appearance.

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 2024, links to all of the archive pages are displayed.

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

A link to the archive index is included in the list if it exists and has the name "/Archive index".

The archive bot notice containing the text "Auto-archiving period" at the right is controlled by the four related parameters: archive_bot, archive_age, archive_units, and minthreadsleft.

archive bot notice
If the page is auto-archived by a bot (typically by Lowercase sigmabot III or ClueBot III), an archive bot notice appears to the right of the archive links, as in the example shown above.

The following parameters may be used to control the display of the archive bot notice:
 * archive_bot – The bot used to archive the page, unwikilinked. (Alias: bot.)


 * archive_age – Enter a number to convey the amount of time the bot must wait after the last update to a discussion before archiving the discussion, as expressed as a number of time units, or days by default. (Alias: age.) The 'days' interval may be changed using the archive_units parameter.


 * archive_units – Enter a string to convey the unit the  parameter refers to.  (Alias: units.) Useful examples include, , , etc.  As this is just an advisory notice and not a configuration parameter, you can use any string you wish here: if you want to specify the archiving delay as  , you can.


 * minthreadsleft – The amount of threads the bot will leave. The tooltip includes a message telling the reader that after  threads, threads older than   will be archived.

Some examples:


 * – This informs the user that lowercase sigmabot III will autoarchive talk page sections that are older than 30 days.
 * – This informs the user that the lowercase sigmabot III bot will autoarchive talk page sections that are older than six months, as long as at least four sections remain. (See § Examples.)

These parameters are for informational purposes in the talk header, and do not actually set up archiving. For instructions on how to configure Talk page archiving, see Help:Archiving a talk page.

The template includes a tooltip informing readers of the amount of time before discussions are archived. This tooltip is not shown if there are no archives present, or they are not named in the standard way.

If you wish to include an independent, stand-alone archive bot notice on the page outside of the Talk header message box, set yes in this template, and see Template:Archives for an alternative method of generating an archive bot notice.

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 no may be used to suppress the search box.

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 yes may be used to suppress the list.

By default, the template displays an archive search box if any archives are present. Parameter no may be used to suppress display of the archive search box. Note in particular that 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 four parameters which may be used to include additional sections or modified text:
 * bottom
 * custom header
 * disclaimer
 * wp.

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

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:

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.

disclaimer
yes – may be used on User talk pages. This param includes the user page disclaimer text found in the current version of template user page, centered in a contrasting color box above the Talk header template, as follows: This parameter has no effect on pages outside of the User talk namespace.

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

This parameter has no effect on pages outside of the Wikipedia talk namespace.

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 or the value  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 twenty expensive parser functions (during 2022, 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 25 uncollapsed invocations of this template, especially ones appearing lower on the page.

TemplateData
{	"params": { "1": {			"aliases": [ "shortcut", "shortcut1", "sc", "sc1" ],			"label": "Shortcut", "description": "Shortcut that displays similar to the template, but within the Talk header message box", "example": "WP:SHOR", "type": "wiki-page-name", "suggested": true },		"2": {			"aliases": [ "shortcut2", "sc2" ],			"label": "Shortcut 2", "description": "A second shortcut", "type": "wiki-page-name" },		"bottom": { "description": "Set to \"yes\" to add additional instructions at the top to \"please place new discussions at the bottom of the talk page\"", "type": "boolean", "suggestedvalues": [ "yes" ]		},		"disclaimer": { "description": "Set to \"yes\" to add an additional banner which identifies the page as being originally from Wikipedia (and modify the width to suit), matching the style of .", "type": "boolean" },		"custom_header": { "label": "Custom header", "description": "Replaces the entire header with customized text", "type": "line" },		"wp": { "label": "WikiProject?", "description": "For use on WikiProject talk pages; set to \"yes\" to add \"and anything related to its purposes and tasks\" to the header", "type": "boolean" },		"display_title": { "label": "Display title", "description": "Displays a custom page title", "type": "string" },		"arpol": { "label": "Article policies", "description": "Adds a link to the article policy pages", "type": "boolean", "default": "On for article talk pages, off otherwise" },		"demospace": { "label": "demospace", "description": "Namespace number or name for testing purposes", "type": "string" },		"hide_find_sources": { "label": "Hide find sources?", "description": "Set to \"yes\" to hide the find sources banner on article talk pages", "type": "boolean" },		"search_term": { "aliases": [ "search_term1" ],			"label": "Search term", "description": "Changes the search term used in the module", "type": "string" },		"search_term2": { "label": "Search term 2", "description": "Adds a second search term for unquoted search, as used in the module", "type": "string" },		"search-domain": { "aliases": [ "domain" ],			"label": "Search domain", "description": "Changes the default search domain used in the module", "suggestedvalues": [ "medical", "video", "general" ],			"type": "string" },		"noarchive": { "aliases": [ "noarchives", "archives" ],			"label": "No archives?", "description": "Set to \"yes\" to hide the archives links", "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 WP:ARCHIVE.", "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 WP:ARCHIVE.", "suggestedvalues": [ "Lowercase sigmabot III", "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": { "label": "Search", "description": "Set to \"no\" to override the default behavior for the search box appearance", "type": "boolean" }	},	"description": "A signpost for the top of talk pages" }