Template:Archive box: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Chris day
imported>Chris day
No edit summary
Line 11: Line 11:


Include the archive box in the article by adding
Include the archive box in the article by adding
<pre>{{Archive box|[[/Archive]]}}</pre>
{| class="wikitable"
! Wikitext !! Appearance
|-
|<pre>{{Archive box|[[/Archive]]}}</pre>
|{{Archive box|[[/Archive]]}}
|}
to where you want the archive box to appear. Make sure to add the forward slash '/' to the archive name to make it a subpage of the page where the archive box is placed. How you present a list of archive pages is up to you. You can separate them with commas, pipes (vertical lines: '|') or as lists. See [[#Examples]] below.
to where you want the archive box to appear. Make sure to add the forward slash '/' to the archive name to make it a subpage of the page where the archive box is placed. How you present a list of archive pages is up to you. You can separate them with commas, pipes (vertical lines: '|') or as lists. See [[#Examples]] below.


Line 22: Line 27:


If all the archives of a talk page are numbered (<tt>/Archive 1</tt>, <tt>/Archive 2</tt> etc.), you can use the <tt>auto</tt> parameter to display links to them all automatically:
If all the archives of a talk page are numbered (<tt>/Archive 1</tt>, <tt>/Archive 2</tt> etc.), you can use the <tt>auto</tt> parameter to display links to them all automatically:
<pre>{{archive box|auto=yes}}</pre>
{| class="wikitable"
! Wikitext !! Appearance
|-
|<pre>{{archive box|auto=yes}}</pre>
|{{archive box|auto=yes}}
|}
 
The list will update itself when new archives are added. If there are also named archives, you can add links to these as well.
The list will update itself when new archives are added. If there are also named archives, you can add links to these as well.


If there are less than 20 archive pages, and you prefer a larger two-column output, set the <tt>auto</tt> parameter to "long", all other parameter values will trigger the above format, so if you want longer and more visible links, try:
If there are less than 20 archive pages, and you prefer a larger two-column output, set the <tt>auto</tt> parameter to "long", all other parameter values will trigger the above format, so if you want longer and more visible links, try:
<pre>{{archive box|auto=long}}</pre>
{| class="wikitable"
! Wikitext !! Appearance
|-
|<pre>{{archive box|auto=long}}</pre>
|{{archive box|auto=long}}
|}


=== Box width and image ===
=== Box width and image ===


The box and image widths can be set by passing their widths as parameters:
The box and image widths can be set by passing their widths as parameters:
<pre>{{Archive box|box-width=13em|image-width=35px|[[/Archive]]}}</pre>
{| class="wikitable"
! Wikitext !! Appearance
|-
|<pre>{{Archive box|box-width=13em|image-width=35px|[[/Archive]]}}</pre>
|{{Archive box|box-width=13em|image-width=35px|[[/Archive]]}}
|}


The image can also be changed from the default, [[:Image:Logo200gr.jpg]], for example:
The image can also be changed from the default, [[:Image:Logo200gr.jpg]], for example:
<pre>{{Archive box|image=[[Image:My favoured image.png]]}}</pre>
{| class="wikitable"
! Wikitext !! Appearance
|-
|<pre>{{Archive box|image=[[Image=[[Image:Heckert_GNU_white.jpg]]}}</pre>
|{{Archive box|image=[[Image=[[Image:Heckert_GNU_white.jpg]]}}
|}


=== Examples ===
=== Examples ===

Revision as of 00:49, 23 February 2007

Archive
Archive box
talk page archives


Usage

Include the archive box in the article by adding

Wikitext Appearance
{{Archive box|[[/Archive]]}}
Archive
Archive box
talk page archives

to where you want the archive box to appear. Make sure to add the forward slash '/' to the archive name to make it a subpage of the page where the archive box is placed. How you present a list of archive pages is up to you. You can separate them with commas, pipes (vertical lines: '|') or as lists. See #Examples below.

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.


Automatic links

If all the archives of a talk page are numbered (/Archive 1, /Archive 2 etc.), you can use the auto parameter to display links to them all automatically:

Wikitext Appearance
{{archive box|auto=yes}}
Archive
Archive box
talk page archives
1, 2, 3, 4

The list will update itself when new archives are added. If there are also named archives, you can add links to these as well.

If there are less than 20 archive pages, and you prefer a larger two-column output, set the auto parameter to "long", all other parameter values will trigger the above format, so if you want longer and more visible links, try:

Wikitext Appearance
{{archive box|auto=long}}

Box width and image

The box and image widths can be set by passing their widths as parameters:

Wikitext Appearance
{{Archive box|box-width=13em|image-width=35px|[[/Archive]]}}
Archive
Archive box
talk page archives

The image can also be changed from the default, Image:Logo200gr.jpg, for example:

Wikitext Appearance
{{Archive box|image=[[Image=[[Image:Heckert_GNU_white.jpg]]}}
image=[[Image=Heckert GNU white.jpg}}

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.

Wikitext Appearance
{{archive box|
[[{{BASEPAGENAME}}/Archive 1|Archive 1]], 
[[{{BASEPAGENAME}}/Archive 2|Archive 2]], 
[[{{BASEPAGENAME}}/Archive 3|December 2005 - January 2006]] and
[[{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}
{{archive box|Image=[[Image:Heckert_GNU_white.jpg]]|
[[{{BASEPAGENAME}}/Archive 1|Archive 1]], 
[[{{BASEPAGENAME}}/Archive 2|Archive 2]], 
[[{{BASEPAGENAME}}/Archive 3|December 2005 - January 2006]] and
[[{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}
{{archive box|approved=no|
[[{{BASEPAGENAME}}/Archive 1|Archive 1]], 
[[{{BASEPAGENAME}}/Archive 2|Archive 2]], 
[[{{BASEPAGENAME}}/Archive 3|December 2005 - January 2006]] and
[[{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}
{{archive box|approved=yes|
[[{{BASEPAGENAME}}/Archive 1|Archive 1]], 
[[{{BASEPAGENAME}}/Archive 2|Archive 2]], 
[[{{BASEPAGENAME}}/Archive 3|December 2005 - January 2006]] and
[[{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}
{{archive box|
[[{{BASEPAGENAME}}/Archive 1|Archive 1]]<br>
[[{{BASEPAGENAME}}/Archive 2|Archive 2]]<br>
[[{{BASEPAGENAME}}/Archive 3|December 2005 - January 2006]]<br>
[[{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}
{{archive box|
:[[{{BASEPAGENAME}}/Archive 1|Archive 1]]
:[[{{BASEPAGENAME}}/Archive 2|Archive 2]]
:[[{{BASEPAGENAME}}/Archive 3|December 2005 - January 2006]]
:[[{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}
{{archive box|
*[[{{BASEPAGENAME}}/Archive 1|Archive 1]]
*[[{{BASEPAGENAME}}/Archive 2|Archive 2]]
*[[{{BASEPAGENAME}}/Archive 3|December 2005 - January 2006]]
*[[{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}
{{archive box|
#[[{{BASEPAGENAME}}/Archive 1|Archive 1]]
#[[{{BASEPAGENAME}}/Archive 2|Archive 2]]
#[[{{BASEPAGENAME}}/Archive 3|December 2005 - January 2006]]
#[[{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}
{{archive box|box-width=14em|image-width=20px|
*[[{{BASEPAGENAME}}/Archive 1|Archive 1]]
*[[{{BASEPAGENAME}}/Archive 2|Archive 2]]
*[[{{BASEPAGENAME}}/Archive 3|December 2005 - January 2006]]
*[[{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}