Template:archive

explain xkcd: It's 'cause you're dumb.
Jump to navigation Jump to search

This is an archive of past discussions about Template:archive and is kept for historical purposes. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current discussion page.
 

Mostly used in these portals and their archives:

Proposals  •  Technical  •  Coordination  •  Admin requests  •  Miscellaneous  •  All

 Create a new topic!      Refresh


Documentation

This template has two modes, switched by whether index is set, plus a list of archives that now always appears underneath, regardless of mode, so you can toggle index on and off without losing the list.

Without index (default), the main box marks the current page as an archive. With index= set to anything non-empty, the main box instead marks the current page as one that has archives. Either way, a second box underneath lists the archives of 1.

Parameters

1 – the page the archives belong to. Defaults to {{NAMESPACE}}:{{BASEPAGENAME}} in archive mode (since the template usually sits one page below the page it's archiving) and to {{FULLPAGENAME}} in index mode (since it usually sits on the page itself). Only set this if the archives belong to a different page than the one showing the notice. index – any non-empty value switches the main box to index mode. comment – extra text inserted right after the first sentence of the main box, in both modes. list – replaces the automatically generated archive list with whatever raw wikitext you provide. prepend – ignored if list is set. Raw wikitext placed above the automatic archive list. append – same as prepend, but placed below the list.

The automatic list checks whether 1/Archive 1 through 1/Archive 30 exist and only shows the ones that do, as a piped bullet list ("Archive 1", "Archive 2", and so on) laid out in narrow columns. If a page ever needs more than 30 archives, the template needs editing to add further numbers. Since prepend and append take raw wikitext rather than a bare page name, include the bullet and link brackets yourself, for example * [[Page|Label]]. A parameter value can't contain a literal pipe directly, since it would be read as the start of a new parameter; use {{!}} in its place if needed.

Examples

Archive page, used as before:


This is an archive of past discussions about Template:archive and is kept for historical purposes. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current discussion page.
 

Discussion page with archives:


This page has an archive. Threads before 2020 were merged rather than archived. Discussions are usually archived after they have remained inactive for a long time or they are no longer relevant.
 

Discussion page with a manual list, and a link above and below it:


This page has an archivearchives. Discussions are usually archived after they have remained inactive for a long time or they are no longer relevant.

Only Archive 30 covers anything still relevant.

(Replace archive above with whatever this template is actually saved as. The live examples above will render using this page as 1, so the automatic list may come up empty here; on the actual talk page it's meant for, it'll pick up whatever archives already exist.)