Template:Archive box: Difference between revisions
imported>Milton Beychok m (→Usage: Added main template to point to a much better explanation of how to archive pages) |
imported>Russell D. Jones (testing layout) |
||
Line 13: | Line 13: | ||
|[[{{TALKSPACE}}:{{BASEPAGENAME}}|Current talk page]]}}</div> | |[[{{TALKSPACE}}:{{BASEPAGENAME}}|Current talk page]]}}</div> | ||
{{#if:{{{auto|}}} | {{#if:{{{auto|}}} | ||
|<div style="text-align: | |<div style="text-align:center">{{#ifeq:{{{auto}}}|long|{{Archive list long}}<br>{{{1|}}}|{{archive list}}<br>{{{1|}}}}}</div> | ||
|{{#if:{{{1|}}} | |{{#if:{{{1|}}} | ||
|{{#ifexist:{{TALKSPACE}}:{{BASEPAGENAME}}/Archive 1|<div style="text-align: | |{{#ifexist:{{TALKSPACE}}:{{BASEPAGENAME}}/Archive 1|<div style="text-align:center"> {{archive list}}</div><div style="text-align:center"> {{{1|}}}</div>|<div style="text-align:center"> {{{1|}}}</div>}} | ||
|<div style="text-align: | |<div style="text-align:center"> {{archive list}}</div>}} }} | ||
</div> | </div> | ||
<noinclude> | <noinclude> |
Revision as of 19:38, 15 July 2013
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.
Usage
This template can be used on article or user talk pages. 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 further #Examples below.
Wikitext | Appearance |
---|---|
{{Archive box| [[{{TALKSPACE}}:{{BASEPAGENAME}}/Archive 1|Archive 1]]}} |
This template can be also placed on all the archived pages to make it convenient to toggle between the different archives and the current talk page. For an example, see this pages talk page and the four example archives associated with this template.
Parameters
The different variable parameters available for this template include:
- auto = (for automatic archiving)
- box-width = (for adjusting box width)
- image-width = (for adjusting image width)
- image = (for customizing the image)
These parameters can be used in combination and are described more fully with examples below.
Automatic links
If all the archives of a talk page are numbered (/Archive 1, /Archive 2 etc.), the Archive box will link to them all automatically. The default option will list the archives with numbers only:
Alternatively, if you want longer and more visible links, try:setting the auto parameter to long since this will give a prose version; all other parameter values will trigger the default format above.
The list will update itself when new archives are added. If there are also named archives, you can add links to these as well. See the additional links shown in the third archive box option below.
Wikitext | Appearance |
---|---|
Just using the simple archive box.{{archive box}} |
|
This example uses the long option for prose and numbers.{{archive box|auto=long}} |
|
This example uses the long option for prose and numbers. In addition, archives that have a non standard name can be added to the bottom.{{archive box|auto=long| [[{{TALKSPACE}}:{{BASEPAGENAME}}/Archive1|December 2005 - January 2006]] and [[{{TALKSPACE}}:{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}} |
Box and image parameters
Wikitext | Appearance |
---|---|
The image can be changed from the default, Image:Logo200gr.jpg, for example:
{{Archive box |image=Image:Heckert_GNU_white.jpg}} |
|
The box and image widths can be adjusted from the default settings by adding their widths as parameters:
{{Archive box |box-width=13em |image-width=35px |image=Image:Heckert_GNU_white.jpg}} |
Examples
Here are several different examples of how hyperlinks to talk page archives can be displayed in the archive box.
Wikitext | Appearance |
---|---|
{{archive box| [[{{TALKSPACE}}:{{BASEPAGENAME}}/Archive1|December 2005 - January 2006]] and [[{{TALKSPACE}}:{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}} |
|
{{archive box| [[{{TALKSPACE}}:{{BASEPAGENAME}}/Archive1|December 2005 - January 2006]]<br> [[{{TALKSPACE}}:{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}} |
|
{{archive box| :[[{{TALKSPACE}}:{{BASEPAGENAME}}/Archive1|December 2005 - January 2006]] :[[{{TALKSPACE}}:{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}} |
|
{{archive box| :*[[{{TALKSPACE}}:{{BASEPAGENAME}}/Archive1|December 2005 - January 2006]] :*[[{{TALKSPACE}}:{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}} |
|
{{archive box| #[[{{TALKSPACE}}:{{BASEPAGENAME}}/Archive1|December 2005 - January 2006]] #[[{{TALKSPACE}}:{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}} |