This page is protected against editing.

Template:Archive box

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Template documentationview · edit · history · purge ]
This documentation is transcluded from Template:Archive box/doc.

No description yet available.

Usage

{{Archive box |1= |auto= }}

Template parameters

ParameterDescriptionDefaultStatus
1archive linksInclude the archive box in the talk page by adding
{{Archive box|[[/Archive]]}}
to where you want the archive box to appear. Substitute [[/Archive]] with the actual name(s) of the archive page(s) and make sure to add the forward slash '/'. How you present a list of archive pages is up to you. You can e.g. separate them with commas or format them as lists. You can also use [[WP:PIPE|piped links]]. See Automatic links and #Examples below.
emptysuggested
autoautomatic linksIf all the archives of a talk page are named exactly /Archive 1, /Archive 2 etc. (it will not work with e.g. /Archive1, /Archive 01, or subpages of a subpage, e.g. /Archives/Archive 1), you can use the auto parameter to display links to them all automatically. The list will update itself when new archives are added. If there are also named archives, you can manually add links to those as well.
Using auto=yes

The links to the archive pages will appear as simple numbers, separated with commas (1, 2, 3, …). Note: Archives numbered past 100 will be ignored.

{{archive box|auto=yes}}
Using auto=long

If there are no more than 36 archive pages, and you prefer a three-column output, set the auto parameter to "long". The links to the archive pages will appear as Archive 1, Archive 2, etc. The links will be put into lines with a line break after each third link, to create columns. (Re-arranging the columns, e.g. from top to bottom, is not possible with this parameter. However, manually added links can be arranged in columns with {{Cols}}. See the example below.)

{{archive box|auto=long}}
emptysuggested
box-widthbox widthThe box width can be set by using this parameter:
{{Archive box|box-width=13em|[[/Archive]]}}
{{Archive box|box-width=200px|[[/Archive]]}}
238pxoptional
image-widthimage widthFor the standard image, the width can be adjusted by using this parameter:
{{Archive box|image-width=35px|[[/Archive]]}}
40pxoptional
image-fileimage fileThe image can also be changed from the default (see #Other icons for examples) using this parameter. You have to write only the filename in, for example: {{Archive box|image-file=Breathe-system-file-manager.svg|image-width=35px}}Replacement filing cabinet.svgoptional
imageimageThe changed image can also be done using this parameter. Please note that if you're using a changed image, the width of that image can not be adjusted with image-width=. Instead, set the image width using normal image syntax, for example: {{Archive box|image=[[File:Breathe-system-file-manager.svg|35px]]}}[[File:Replacement filing cabinet.svg|40px |link= |Archive]]optional
linklinkOverride the default link in the archive box headerSpecial:MyLanguage/Commons:Talk page guidelines#Archivingoptional
dirsirWriting system direction; used for switching floating style (left/right side)value received from {{Dir}} called based on {{CURRENTCONTENTLANGUAGE}}optional
Template data
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData

TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.


Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either ‎useTemplateData=1 or ‎useTemplateData=only on the ‎/doc subpage and transcluding it with {{Documentation}} into the template. ‎<nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.

Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw ‎<templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.

Discussion
There is an ongoing discussion about that matter. Feel invited to comment if you are experienced in either way, your time permits and if you like to share your opinion or to make a suggestion.


Wikipedia's help about TemplateDataCommons-specific information

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
archive links1

Include the archive box in the talk page by adding {{Archive box|archive pages list}}.

Contentsuggested
automatic linksauto

If all the archives of a talk page are named exactly “/Archive 1”, “/Archive 2”, etc., you can use the “auto” parameter to display links to them all automatically. The list will update itself when new archives are added. If there are also named archives, you can manually add links to those as well.

Suggested values
1 yes long
Auto value
1
Stringsuggested
box widthbox-width

The box width can be set by using this parameter.

Default
238px
Stringoptional
sirdir

Writing system direction; used for switching floating style (left/right side)

Default
value received from [[:Template:Dir|<span style="font-family:monospace,monospace;">&#123;&#123;Dir&#125;&#125;</span>]] called based on {{CURRENTCONTENTLANGUAGE}}
Stringoptional
imageimage

The changed image can also be done using this parameter. Please note that if you're using a changed image, the width of that image can not be adjusted with “|image-width=”. Instead, set the image width using normal image syntax.

Default
[[File:Replacement filing cabinet.svg|40px |link= |Archive]]
Contentoptional
image fileimage-file

The image can also be changed from the default (see [[#Other icons]] for examples) using this parameter. You have to write only the filename, excluding the namespace.

Default
Replacement filing cabinet.svg
Fileoptional
image widthimage-width

For the standard image, the width can be adjusted by using this parameter

Default
40px
Stringoptional
linklink

Override the default link in the archive box header

Default
[[Special:MyLanguage/Commons:Talk page guidelines#Archiving]]
Stringoptional

Additional information

The template is intended to be used in the following namespaces: all talk namespaces and noticeboards

The template is intended to be used by the following user groups: all users

Placement: At the top of the page

See also

Localization

العربية  বাংলা  čeština  dansk  Deutsch  English  فارسی  suomi  français  galego  עברית  hrvatski  magyar  Bahasa Indonesia  italiano  日本語  한국어  македонски  മലയാളം  Nederlands  polski  português  português do Brasil  русский  slovenščina  svenska  ไทย  Türkçe  українська  Tiếng Việt  中文

This template makes use of {{Autotranslate}} and the translate extension.


Placement

The box uses a style that makes it float to the right. This means that where it appears in the page it will be aligned to the right edge of the page (more accurately: the containing box, but that is an unnecessary detail) and all following content will flow around it.

(On some article or wikiproject talk pages, there is more than one right floating box. In that case, the edit links of the text sections next to those boxes often "bunch up". en:Wikipedia:How to fix bunched-up edit links provides an historical solution for a similar problem on the English Wikipedia. See en:Talk:European Union for an example.)

Examples

For actual examples of the use of this template, use the what links here link in the toolbox on the sidebar, near the top on the left side of this page (unless you are using an unconventional skin ... in which case you probably know what you are doing).

Wikitext Appearance
{{archive box|
[[/Archive 1]],
[[/Archive 2]],
[[/December 2005 - January 2006]] and
[[/Deletion discussion]]}}
{{archive box|
[[/Archive 1]]<br />
[[/Archive 2]]<br />
[[/December 2005 - January 2006]]<br />
[[/Deletion discussion]]}}
{{archive box|
: [[/Archive 1]]
: [[/Archive 2]]
: [[/December 2005 - January 2006]]
: [[/Deletion discussion]]}}
{{archive box|image=[[Image:File-manager.svg|35px]]|
* [[/Archive 1|Archive 1]]
* [[/Archive 2]]
* [[/December 2005 - January 2006]]
* [[/Deletion discussion]]}}
{{archive box|
# [[/Archive 1]]
# [[/Archive 2]]
# [[/December 2005 - January 2006]]
# [[/Deletion discussion]]}}
{{archive box|box-width=14em|image-width=20px|
* [[/Archive 1]]
* [[/Archive 2]]
* [[/December 2005 - January 2006]]
* [[/Deletion discussion]]}}
{{Archive box|
{{Cols|
'''2006'''<br>
[[/Archive1|1]]<br>
[[/Archive2|2]]<br>
[[/Archive3|3]]<br>
[[/Archive4|4]]<br>
[[/Archive5|5]]<br>
|
'''2007'''<br>
[[/Archive6|6]]<br>
[[/Archive7|7]]<br>
[[/Archive8|8]]<br>
[[/Archive9|9]]<br>
[[/Archive10|10]]<br>
[[/Archive11|11]]<br>
|
'''2008'''<br>
[[/Archive12|12]]<br>
[[/Archive13|13]]<br>
}}
}}

Other icons

If you wish to use something other than the default icon, here is a gallery of available icons: