Template:Yearly archive list

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Template documentation[view] [edit] [history] [purge]

This template returns a list of existing archive subpages with names that end in a four-digit year. The list is in short format, i.e. just the four-digit years, separated by commas. Each year is linked to the matching archive. All entries are on a single line with no line breaks, in a format suitable to pass to parameter list of Template:archives.


{{ Yearly archive list 
| root   = 
| prefix = 
Default = {{FULLPAGENAME}}/.
Can be used to specify which page is searched. The default is the page where the template is placed. Use prefix for anything that belongs between the trailing slash and the year number.
Default = "Archive " (No quotes, but note trailing space.)
Specify a base that will be inserted between root and the four-digit year. Use   to represent a whitespace between the prefix and the year, since leading trailing spaces are stripped from named parameters before being passed. Quotes don't help.


{{ Yearly archive list
| root   = Talk:Ionizing radiation
| prefix = Archive 

will find all the archives of Talk:Ionizing radiation and return 2006, 2007, 2008, 2009, 2010, 2011, 2012

Using the defaults, {{Yearly archive list}}, if placed on Talk:Ionizing radiation, would also return 2006, 2007, 2008, 2009, 2010, 2011, 2012

If the archives are named by year only, immediately preceded by a '/' (slash), then the default prefix must be overwritten. For example, if an archive is of the form User talk:Ytrottier/Archives/2005 then this:

{{ Yearly archive list
| root   = User talk:Ytrottier/Archives
| prefix = 

or if placed directly on User talk:Ytrottier this:

{{ Yearly archive list
| prefix = /Archives/

will return 2005, 2006, 2007, 2008, 2009, 2010, 2012.


The first year of the archive must be between 2001 and 2020. The last year may be no more than 25 years after the first. These limits are arbitrary and may be extended simply by copying more lines of code.

See also[edit]