Changes

Jump to navigation Jump to search
rm span tags that result in strange formatting. Black text is fine.
{{Documentation subpage}}
Documentation for Template:Archive box collapsible. The <span style="color:#008000;">green text</span> contains advanced tips which you may ignore or apply at your own leisure.
==Usage==
Include the collapsible archive box in the talk page by adding
<pre>{{Archive box collapsible|[[/Archive]]}}</pre>
to where you want the archive box to appear. Substitute <kbd><nowiki>[[/Archive]]</nowiki></kbd> 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|<nowiki>[[</nowiki>WP:PIPE|piped links<nowiki>]]</nowiki>]]. See [[#Automatic links|Automatic links]] and [[#Examples|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 <code>large=yes</code> as a parameter produces a center-aligned box at 80% page width, which is the standard for talk page templates. If you're using the archive box on an article or wikiproject talk page, you may want to use this to make the box blend in with the rest of the page. Using this parameter disables the box-width option.
<pre>{{Archive box collapsible|large=yes|[[/Archive]]}}</pre>
{{Archive box collapsible|large=yes|[[/Archive]]}}

=== Box width ===
The box width can be set by using the <code>box-width=</code> parameter, with [[Em (typography)|em]] or [[Pixel|px]] as the unit of measurement:
<pre>{{Archive box collapsible|box-width=13em|[[/Archive]]}}</pre>
<pre>{{Archive box collapsible|box-width=200px|[[/Archive]]}}</pre>

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

=== Automatic links ===
If all the archives of a talk page are named ''exactly'' <kbd>/Archive 1</kbd>, <kbd>/Archive 2</kbd> etc. (it will ''not'' work with e.g. <kbd>/Archive1</kbd> or <kbd>/Archive 01</kbd>), you can use the <kbd>auto</kbd> parameter to display links to them all automatically. The list will update itself when new archives are added. If there are also differently named archives, you can still manually add links to those. Note the <code>root=</code> option below in case the archive pages are not direct subpages of the talk page.

<div id="auto=yes"></div>
;Using <code>auto=yes</code>:
{{Archive box collapsible|auto=yes|
*[[/manually added example link]]}}
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.
<pre>{{Archive box collapsible|auto=yes|
*[[/manually added example link]]}}</pre>

*The optional parameters <code>root=</code>, <code>links=</code>, and <code>nobr=</code> can be used with <code>auto=yes</code> ([[Template:Archive list|learn more]]).<br /><code>root=</code> determines the archive root page. The root defaults to the page where the template is transcluded (the talk page itself); thus, where the archive pages are subpages of a different page, it can be specified using <code>root=</code>.<br /><code>links=</code> determines the maximum number of links per line, while <code>nobr=yes</code> disables arbitrary linebreaks.<br />The following example will look for a user's talk page archives named ''/Archives/Archive 1'', ''/Archives/Archive 2'', etc., and list up to 5 archives per line:
<pre>{{Archive box collapsible
|auto=yes
|root=User_Talk:{{PAGENAME}}/Archives
|links=5}}</pre>

;Using <code>auto=long</code>:
{{Archive box collapsible|auto=long|
*[[/manually added example link]]}}
If there are no more than 36 archive pages, and you prefer a three-column output, set the <kbd>auto</kbd> parameter to "long". The links to the archive pages will appear as "<span style="color:#0645AD;">Archive 1</span>", "<span style="color:#0645AD;">Archive 2</span>", etc. The links will be put into lines with a line break after each third link, to create columns.
<pre>{{Archive box collapsible|auto=long|
*[[/manually added example link]]}}</pre>

*Re-arranging the columns, e.g. from top to bottom, is ''not'' possible with <code>auto=long</code>. However, manually added links can be arranged in columns with {{tl|multicol}}. See the [[#multicol|multicol example]] below.
*The optional parameter <code>root=</code> is available with <code>auto=long</code> ([[#auto=yes|see above]]).

=== Examples ===
For actual examples of the use of this template, see the [//en.wikipedia.org/w/index.php?title=Special:WhatLinksHere/Template:Archive_box_collapsible&hidelinks=1&hideredirs=1 pages that link here].

{| class="table" align="center" style="background:transparent;"
! Wikitext !! Appearance
|-
|<pre>{{archive box collapsible|
[[/Archive 1]],
[[/Archive 2]],
[[/December 2005 - January 2006]] and
[[/Deletion discussion]]}}</pre>
|{{archive box collapsible|
[[/Archive 1]],
[[/Archive 2]],
[[/December 2005 - January 2006]] and
[[/Deletion discussion]]}}
|-
|<pre>{{archive box collapsible|box-width=200px|{{plainlist|indent=1|
*[[/Archive 1]]
*[[/Archive 2]]
*[[/December 2005 - January 2006]]
*[[/Deletion discussion]]
}}}}</pre>
|{{archive box collapsible|box-width=200px|{{plainlist|indent=1|
*[[/Archive 1]]
*[[/Archive 2]]
*[[/December 2005 - January 2006]]
*[[/Deletion discussion]]
}}}}
|-
|<pre>{{archive box collapsible|
: [[/Archive 1]]
: [[/Archive 2]]
: [[/December 2005 - January 2006]]
: [[/Deletion discussion]]}}</pre>
|{{archive box collapsible|
: [[/Archive 1]]
: [[/Archive 2]]
: [[/December 2005 - January 2006]]
: [[/Deletion discussion]]}}
|-
|<pre>{{archive box collapsible|
* [[/Archive 1|Archive 1]]
* [[/Archive 2]]
* [[/December 2005 - January 2006]]
* [[/Deletion discussion]]}}</pre>
|{{archive box collapsible|
* [[/Archive 1|Archive 1]]
* [[/Archive 2]]
* [[/December 2005 - January 2006]]
* [[/Deletion discussion]]}}
|-
|<pre>{{archive box collapsible|
# [[/Archive 1]]
# [[/Archive 2]]
# [[/December 2005 - January 2006]]
# [[/Deletion discussion]]}}</pre>
|{{archive box collapsible|
# [[/Archive 1]]
# [[/Archive 2]]
# [[/December 2005 - January 2006]]
# [[/Deletion discussion]]}}
|-
|<pre>{{archive box collapsible|box-width=10em|
* [[/Archive 1]]
* [[/Archive 2]]
* [[/December 2005 - January 2006]]
* [[/Deletion discussion]]}}</pre>
|{{archive box collapsible|box-width=10em|
* [[/Archive 1]]
* [[/Archive 2]]
* [[/December 2005 - January 2006]]
* [[/Deletion discussion]]}}
|-
|<pre>{{archive box collapsible|
{{flatlist|
;2006
:[[/Archive1|1]]
:[[/Archive2|2]]
:[[/Archive3|3]]
:[[/Archive4|4]]
:[[/Archive5|5]]
}}{{flatlist|
;2007
:[[/Archive6|6]]
:[[/Archive7|7]]
:[[/Archive8|8]]
:[[/Archive9|9]]
:[[/Archive10|10]]
:[[/Archive11|11]]
}}{{flatlist|
;2008
:[[/Archive12|12]]
:[[/Archive13|13]]
}}
}}</pre>
|
{{archive box collapsible|
{{flatlist|
;2006
:[[/Archive1|1]]
:[[/Archive2|2]]
:[[/Archive3|3]]
:[[/Archive4|4]]
:[[/Archive5|5]]
}}{{flatlist|
;2007
:[[/Archive6|6]]
:[[/Archive7|7]]
:[[/Archive8|8]]
:[[/Archive9|9]]
:[[/Archive10|10]]
:[[/Archive11|11]]
}}{{flatlist|
;2008
:[[/Archive12|12]]
:[[/Archive13|13]]
}}
}}
|}
<div id="multicol"></div>
The below example combines the <code>large=yes</code> parameter with {{tl|col-begin}}:
<pre>{{archive box collapsible|large=yes|
{{col-begin}}
{{col-3}}
;2006
:[[/Archive1|January - March]]
:[[/Archive2|April - May]]
:[[/Archive3|June - August]]
:[[/Archive4|September - October]]
:[[/Archive5|November - December]]
{{col-3}}
;2007
:[[/Archive6|January - February]]
:[[/Archive7|March - May]]
:[[/Archive8|June - July]]
:[[/Archive9|August]]
:[[/Archive10|September - October]]
:[[/Archive11|November - December]]
{{col-3}}
;2008
:[[/Archive12|January]]
:[[/Archive13|February - March]]
{{col-end}}
}}</pre>
{{archive box collapsible|large=yes|
{{col-begin}}
{{col-3}}
;2006
:[[/Archive1|January - March]]
:[[/Archive2|April - May]]
:[[/Archive3|June - August]]
:[[/Archive4|September - October]]
:[[/Archive5|November - December]]
{{col-3}}
;2007
:[[/Archive6|January - February]]
:[[/Archive7|March - May]]
:[[/Archive8|June - July]]
:[[/Archive9|August]]
:[[/Archive10|September - October]]
:[[/Archive11|November - December]]
{{col-3}}
;2008
:[[/Archive12|January]]
:[[/Archive13|February - March]]
{{col-end}}
}}

==See also==
{{Warchivenav|state=uncollapsed}}

<includeonly>{{sandbox other||
[[Category:Archival templates]]
[[Category:Talk header templates]]
}}</includeonly>
Anonymous user

Navigation menu