跳转到内容

模組:Team appearances list/doc

维基百科,自由的百科全书

这是本页的一个历史版本,由Liu116留言 | 贡献2019年6月18日 (二) 08:23编辑。这可能和当前版本存在着巨大的差异。

这是Module:Team appearances list的文档页面

本模块为{{Team appearances list}}所使用,需要了解更详细的用法请查阅该模板的文档。

模块

本模块为{{Team appearances list}}所使用,以便返回一个国家和地区在某一项特定赛事的参赛记录,该记录以水平列表的形式呈现。每一个列表项均为内链,链接至某一年份该国家和地区的代表团条目,如果该国家和地区在某一年份未参加该赛事,则相应年份处会以灰色显示。

The names of the competition and team must be specified. Optionally, information for a competition can be defined in Module:Team appearances list/data, and team information can be included:

  • begin_year – The first year to be shown.
  • end_year – The last year to be shown.
  • Years the team did not attend the competition.

If begin_year or end_year are defined for a team, they set default values that can be overridden with parameters in the template.

If a team is defined for a particular competition, any absent years in the templace call are ignored (instead, the absences defined in the data module are used).

Module:Team appearances list/show is used for testing. It shows the results for all competition/team pairs defined in the data module. The results are displayed at Module talk:Team appearances list/show.

Errors

Parameters provided by the template are validated using the following rules.

Always:
    competition   required : non-empty string
    team          required : non-empty string

If competition is defined in data module:
    begin_year    optional : number from 1800 to 2100 inclusive
    end_year      optional : as above (and end_year >= begin_year)
else:
    begin_year    required : as above
    end_year      optional : as above
    interval      required : number from 1 to 30 inclusive

An invalid parameter causes an error to be displayed and places the page in the hidden category Category:Pages with script errors.