Difference between revisions of "Template:Archive navigation/doc"

From blackwiki
Jump to navigation Jump to search
blackwiki>Plastikspork
(Now deleted)
m (18 revisions imported)
 
(8 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
<includeonly>{{esoteric}}</includeonly>
+
<!-- PLEASE ADD CATEGORIES AT THE BOTTOM OF THIS PAGE -->
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
 
  
 
===Example display===
 
===Example display===
 
<div style="text-align: center;">
 
<div style="text-align: center;">
<div style="display: inline;">&larr; [[Template talk:Archive-nav|Archive 1]] |</div>
+
<div style="display: inline;">&larr; [[Template talk:Archive navigation|Archive 1]] |</div>
 
<div style="display: inline;">'''Archive 2'''</div>
 
<div style="display: inline;">'''Archive 2'''</div>
<div style="display: inline;">| [[Template talk:Archive-nav|Archive 3]] &rarr;</div>
+
<div style="display: inline;">| [[Template talk:Archive navigation|Archive 3]] &rarr;</div>
 
</div>
 
</div>
  
 
=== Usage ===
 
=== Usage ===
<tt><nowiki>{{archive-nav|N}}</nowiki></tt> where N is archive number. Archive subpages must be named as "Archive 1", "Archive 2", "Archive 3", etc. for this to work. Otherwise use <tt><nowiki>{{archive-nav|N|prev=Prev|next=Next}}</nowiki></tt>, where Prev and Next are the names of the preceding and following archive subpages (e.g. <tt><nowiki>{{archive-nav|3|prev=Archive2|next=archive 4}}</nowiki></tt>).
+
<kbd><nowiki>{{archive-nav|N}}</nowiki></kbd> where N is archive number. Archive subpages must be named as "Archive 1", "Archive 2", "Archive 3", etc. for this to work. Otherwise use <kbd><nowiki>{{archive-nav|N|prev=Prev|next=Next}}</nowiki></kbd>, where Prev and Next are the names of the preceding and following archive subpages (e.g. <kbd><nowiki>{{archive-nav|3|prev=Archive2|next=archive 4}}</nowiki></kbd>).
  
 
Optionally, you can use {{tl|archive number}} to provide N for you.
 
Optionally, you can use {{tl|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 <code>showmissing=0</code>.
  
 
=== See also ===
 
=== See also ===
Line 21: Line 22:
 
{{Warchivenav}}
 
{{Warchivenav}}
  
<includeonly>
+
== TemplateData ==
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
+
{{TemplateData header}}
[[Category:Archival templates|{{PAGENAME}}]]
+
<templatedata>
[[Category:Talk header templates|{{PAGENAME}}]]
+
{
 +
"params": {
 +
"1": {
 +
"label": "N",
 +
"description": "Number of current archive page",
 +
"example": "2",
 +
"type": "number",
 +
"default": "2",
 +
"required": true,
 +
"suggested": true
 +
},
 +
"prev": {
 +
"label": "previous archive page",
 +
"description": "Name of previous archive subpage.",
 +
"type": "string",
 +
"default": "Archive N-1",
 +
"example": "archive1"
 +
},
 +
"showmissing": {
 +
"label": "show missing links",
 +
"description": "Show links to pages that are missing.",
 +
"example": "0",
 +
"type": "boolean",
 +
"default": "1"
 +
},
 +
"next": {
 +
"label": "next archive subpage",
 +
"description": "Name of next archive subpage.",
 +
"example": "archive3",
 +
"type": "wiki-page-name",
 +
"default": "Archive N+1"
 +
}
 +
},
 +
"description": "Archive page navigation",
 +
"paramOrder": [
 +
"1",
 +
"prev",
 +
"next",
 +
"showmissing"
 +
]
 +
}
 +
</templatedata>
  
[[cs:Šablona:Archiv]]
+
<includeonly>{{Sandbox other||
[[ja:Template:Archive navigation]]
+
<!-- CATEGORIES HERE, THANKS -->
[[vi:Tiêu bản:Lưu trữ-nav]]
+
[[Category:Archival templates]]
</includeonly>
+
[[Category:Talk header templates]]
 +
}}</includeonly>

Latest revision as of 12:46, 23 October 2020

Example display

Archive 1 |
Archive 2
| Archive 3

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

Template:Warchivenav

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

Template parameters

ParameterDescriptionTypeStatus
N1

Number of current archive page

Default
2
Example
2
Numberrequired
previous archive pageprev

Name of previous archive subpage.

Default
Archive N-1
Example
archive1
Stringoptional
next archive subpagenext

Name of next archive subpage.

Default
Archive N+1
Example
archive3
Pageoptional
show missing linksshowmissing

Show links to pages that are missing.

Default
1
Example
0
Booleanoptional