Difference between revisions of "Template:Archive navigation"
Jump to navigation
Jump to search
blackwiki>Codename Lisa (Old TfD) |
blackwiki>GPHemsley (Link to next archive even if missing; add 'showmissing' parameter to control.) |
||
| Line 2: | Line 2: | ||
{{#ifeq:{{#expr:{{{1|2}}}-1}}|0| | {{#ifeq:{{#expr:{{{1|2}}}-1}}|0| | ||
|← [[{{FULLBASEPAGENAME}}/{{{prev|Archive {{#expr:{{{1|2}}}-1}}}}}|Archive {{#expr:{{{1|2}}}-1}}]] |  | |← [[{{FULLBASEPAGENAME}}/{{{prev|Archive {{#expr:{{{1|2}}}-1}}}}}|Archive {{#expr:{{{1|2}}}-1}}]] |  | ||
| − | }}'''Archive {{{1|2}}}'''{{#ifexist:{{FULLBASEPAGENAME}}/{{{next|Archive {{#expr:{{{1|2}}}+1}}}}} | + | }}'''Archive {{{1|2}}}'''{{#ifexpr:{{{showmissing|1}}} or {{#ifexist:{{FULLBASEPAGENAME}}/{{{next|Archive {{#expr:{{{1|2}}}+1}}}}}|1|0}} |
| | [[{{FULLBASEPAGENAME}}/{{{next|Archive {{#expr:{{{1|2}}}+1}}}}}|Archive {{#expr:{{{1|2}}}+1}}]] → | | | [[{{FULLBASEPAGENAME}}/{{{next|Archive {{#expr:{{{1|2}}}+1}}}}}|Archive {{#expr:{{{1|2}}}+1}}]] → | ||
}} | }} | ||
Revision as of 08:26, 22 November 2016
Contents
Example display
Usage
{{archive-nav|N}} where N is archive number. Archive subpages must be named as "Archive 1", "Archive 2", "Archive 3", etc. for this to work. Otherwise use {{archive-nav|N|prev=Prev|next=Next}}, where Prev and Next are the names of the preceding and following archive subpages (e.g. {{archive-nav|3|prev=Archive2|next=archive 4}}).
Optionally, you can use {{archive number}} to provide N for you.
By default, a link to the next archive will be generated, even if that archive does not exist. To suppress this link, use showmissing=0.
See also
- {{Archive number}} for a way to automatically insert the archive number.
- {{archive nav}}
- {{Talk archive navigation}}
TemplateData
This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.
TemplateData for Archive navigation
Archive page navigation
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| N | 1 | Number of current archive page
| Number | required |
| previous archive page | prev | Name of previous archive subpage.
| String | optional |
| next archive subpage | next | Name of next archive subpage.
| Page | optional |
| show missing links | showmissing | Show links to pages that are missing.
| Boolean | optional |
| The above documentation is transcluded from Template:Archive navigation/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |