User:Halo2/Archive-Nav

Jump to: navigation, search


Information icon.svg This template employs intricate features of template syntax.
You are encouraged to familiarise yourself with its setup and parser functions before editing the template. If your edit causes unexpected problems, please undo it quickly, as this template may appear on a large number of pages.
Remember that you can conduct experiments, and should test all improvements, in either the general Template sandbox or your user space before changing anything here.

Example display

Archive This is an archive of past discussions. 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 Template:Querylink.
←  Archive 2020-01  •  Archive - February 2020  •  Archive 2020-03  →

Usage

{{User:Halo2/Archive-Nav | yyyy = 2020 | mm = 02 }}

Where the parameters yyyy is the four digit year (eg. 2020) and mm is the month number and must include a leading zero (eg. 02). It can be used on any users talk page, but for use with the archiving bot (see below) the archive parameter (of the bot) would need to be changed.

Notes

The layout of this templates design comes from {{Archive-nav}}.
This template must have the leading zero included for the mm parameter. The code below (for the archiving bot) makes sure of this. The leading zero insures the created page name is constant (using the yyyy-mm context), and this template header also follows this rule.
This page was created so User:MiszaBot could create an archive page of my talk page using the date as a name. The code below is an example which tells the bot to archive every 10 days creating the monthly page name of User talk:Halo2/Archive 2020-02. It also puts this template in the header of each page, changing it every month so it reflects the date of its archive page. See MiszaBot "how to" page for more information.

{{User:MiszaBot/config
| counter = 
| algo = old(10d)
| archive = User talk:Halo2/Archive %(year)d-%(month)02d
| archiveheader = {{User:Halo2/Archive-Nav | yyyy = %(year)d | mm = %(month)02d }}
}}

Linked-in.jpg