Template:Archive list
本模板使用 Lua 语言: |
This template can be applied to any talk page or discussion archive, and will return links to all the numbered archives of that page or its parent page. By default the template uses the naming convention specified at Wikiversity:ARCHIVE, Talk:PAGENAME/Archive 1
, with a capital A, a space before the number, and no leading zeros. This template should not usually be substituted – that way, the list of links will update itself whenever a new numbered archive is added.
This template can be used with {{archive box}} to produce a box of numbered archive links without entering them all manually. To do this, use {{archive box|auto=yes}}
.
Usage
编辑{{archive list | root = | links = | nobr = | prefix = | prefixspace = | linkprefix = | linkprefixspace = | sep = | linesep = | start = | max = }}
Parameters
编辑Valid parameters are:
root = <root>
- use this to specify a root other than that of the page from which the template is transcluded.links = #
- the number of links to display per line. The default is 10.nobr = yes
- set this toyes
to remove all line breaks. This parameter cannot be used in conjunction with|links=
.prefix = <prefix>
- a custom prefix for the archives, without the number. The default is "Archive ".prefixspace = yes
- adds a space between the prefix and the archive number for prefixes specified with|prefix=
.linkprefix = <linkprefix>
- a custom prefix for the display links, without the number. The default is blank.linkprefixspace = yes
- adds a space between the link prefix and the archive number for prefixes specified with|linkprefix=
.sep = <sep>
- the separator for archive links. The default value is the comma separator for the language set in your preferences: "、
". If this is set to eitherdot
(·
),pipe
(|
),comma
(、
), ortpt-languages
(⧼tpt-languages-separator⧽
), then it uses that separator as specified for your default language. If it is any other value, that value is used as it is. Whitespace is stripped from the values, but this can be worked around by using 
(for spaces) and<br />
(for new lines). It is also possible to work around the whitespace limitation by calling Module:Archive list directly from another Lua module.linesep = <linesep>
- the separator for lines of archive links. The possible input values are the same as for the|sep=
parameter, and the default separator text is<br />
. How often the value is displayed depends on the value of|links=
.start = #
- the archive number to start listing archives from. This must be smaller than the largest archive number, or|max=
if it is specified.max = #
- the largest archive number to list. This overrides the automatic detection of archive page numbers.
Limitations
编辑This template has been updated to use Module:Archive list. The old template was limited to detecting 200 archives, but now there is no such limitation. However, at very high numbers of archives the template might reach the expensive function call limit. On a page with no other templates that call expensive functions, this template should be able to output 400,000+ archive links. On pages with other templates that make expensive function calls, it may fail sooner.
See also
编辑- Module:Archive list - the Lua module this template is based on.
- {{archive list long}}
- {{archive list long inline}}
Related templates
编辑For other related templates see navbox below.
|
上述文档嵌入自Template:Archive list/doc。 (编辑 | 历史) 编者可以在本模板的沙盒 (创建 | 镜像)和测试样例 (创建)页面进行实验。 请在/doc子页面中添加分类。本模板的子页面。 |