Template:Archive box collapsible

Documentation icon Template documentation[view] [edit] [history] [purge]

Include the collapsible archive box in the talk page by adding

{{Archive box collapsible|[[/Archive]]}}

to where you want the archive box to appear. Then change the [[/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 separate them with commas or format them as lists. See #Automatic links and #Examples below.

Placement

This template uses two different visual styles.

Standard style

The standard style makes the box float to the right. This means that where it appears in the page it will be aligned to the right edge of the page and all following content will flow around it.

Large style

Using large=yes as a parameter makes the template to appear in the center of the page and have a width equal to 80% of the page width, which is the standard for talk page templates. (Using this parameter disables the box-width option.) For example, this code:

{{Archive box collapsible|large=yes|[[/Archive]]}}

results in:

Box width

The box width can be set by passing the width as a parameter, like:

{{Archive box collapsible|box-width=13em|[[/Archive]]}}

or

{{Archive box collapsible|box-width=238px|[[/Archive]]}}

The standard width when this parameter is not used is 200px.

Automatic links

If all the archives of a talk page are numbered 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:

{{archive box collapsible|auto=yes}}

The list will update itself when new archives are added. The links to the archive pages will appear as simple numbers, separated with commas (1, 2, 3, ...).

If there are less 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. Here is an example code:

{{archive box collapsible|auto=long}}

Examples

For actual examples of the use of this template, see the pages that link here. Below, you can find some simple examples:

Wikitext Appearance
{{archive box collapsible|
[[/Archive 1]],
[[/Archive 2]],
[[/December 2005 - January 2006]] and
[[/Deletion discussion]]}}
{{archive box collapsible|box-width=238px|
[[/Archive 1]]<br />
[[/Archive 2]]<br />
[[/December 2005 - January 2006]]<br />
[[/Deletion discussion]]}}
{{archive box collapsible|
: [[/Archive 1]]
: [[/Archive 2]]
: [[/December 2005 - January 2006]]
: [[/Deletion discussion]]}}
{{archive box collapsible|
* [[/Archive 1]]
* [[/Archive 2]]
* [[/December 2005 - January 2006]]
* [[/Deletion discussion]]}}
{{archive box collapsible|
# [[/Archive 1]]
# [[/Archive 2]]
# [[/December 2005 - January 2006]]
# [[/Deletion discussion]]}}
{{archive box collapsible|box-width=14em|
* [[/Archive 1]]
* [[/Archive 2]]
* [[/December 2005 - January 2006]]
* [[/Deletion discussion]]}}

Related pages