Template:Archive-box

来自Terraria Wiki
跳到导航 跳到搜索
This template is i18n-ready, which means it is easy to localize for different languages. Please see I18n & l10n for templates to learn more.
See Template:Archive-box/l10n for the localization of this template.
Template-info.svg 文档 以下文档来自Template:Archive-box/doc。(编辑 | 历史

This template displays a box with automatically generated links to subpages of a (talk) page which are declared as "archive" subpages (<page name>/Archive <custom identifier>, e.g. Terraria Wiki:Community noticeboard/Archive 2011). It also provides a search box to perform wiki searches only in these pages.

Usage

All parameters are optional.

{{archive-box | title = <custom title of the box> | basepage = <root of the archive subpages> | break = no | width = <width of the input box> | searchbuttonlabel = <custom label of the search button> | placeholder = <custom placeholder text> | <custom, hard-coded list of archive subpages> }}

title

Custom title of the archive box. Default is "Talk Archives".

basepage

The "common denominator" of all archive subpages, e.g. Terraria Wiki:Community noticeboard/Archive  for Terraria Wiki:Community noticeboard/Archive 2011, Terraria Wiki:Community noticeboard/Archive 2012, etc. Defaults to <page name>/Archive.

break

Whether or not to insert a line break between the input box and the button. Default is yes.

width

Width of the input box, in characters. Default is 22.

searchbuttonlabel

Label of the button beneath (or next to) the input box. Default is Search archives.

placeholder

Text that will be displayed in the input box when it is empty (similar to how the regular search bar displays "在Terraria Wiki搜索" when it is empty). Default is Search term.

First unnamed parameter

Can be used to manually define the list of archive subpages. This disables the automatic generation entirely, also prevents the search input box from displaying, and thus causes all of the other parameters (except $title) to have no effect.

For consistency reasons, the list should be entered in the following format:

* [[<link to archive subpage 1>|<archive identifier 1>]]
* [[<link to archive subpage 2>|<archive identifier 2>]]