模板:GamesSport/sandbox
[[{{{1}}}]]
| 这是Template:GamesSport(差异)的沙盒。 参见本模板的测试样例。 |
GamesSport模版只用于综合运动会的主条目,以简化运动会各运动项目的列表。
此类条目中,通常会列出所举办的运动种类,每项显示以下资讯:
- 该体育运动主条目的链接
- 该运动会上,该种运动的子条目链接。(子条目包含详细介绍和比赛结果)
- 一个整数,表示运动会中,该种运动共计几项赛事
GamesSport模板只需输入体育运动的名称,就能显示上述资讯。基本用法为:
{{GamesSport|SPORT}}
注意模板依循奥委会的命名惯例,故“football”指协会足球而非美式橄榄球,“hockey”则指草地曲棍球。
不用GamesSport
[编辑]未有GamesSport以先,上列各元素需要逐一写出,以2017年夏季世界大学生运动会为例,可写成:
{{col-begin}}
{{col-3}}
*[[田径]]{{detailslink|2017年夏季世界大学生运动会田径比赛}}
*[[篮球]]{{detailslink|2017年夏季世界大学生运动会篮球比赛}}
*[[跳水]]{{detailslink|2017年夏季世界大学生运动会跳水比赛}}
{{col-3}}
*[[击剑]]{{detailslink|2017年夏季世界大学生运动会击剑比赛}}
*[[足球]]{{detailslink|2017年夏季世界大学生运动会足球比赛}}
{{col-3}}
*[[竞技体操]]{{detailslink|2017年夏季世界大学生运动会体操比赛}}
*[[韵律体操]]{{detailslink|2017年夏季世界大学生运动会体操比赛}}
(后略)
{{col-end}}
利用GamesSport
[编辑]使用GamesSport,可更易生成同样的效果,而无须逐一找出对应项目的条目和象形图案。放置比赛结果的条目名,可以由运动名与所在运动会的名称自动得到:若在此使用模板,将链接至“GamesSport/doc某某比赛”,而在2016年夏季奥林匹克运动会,则链至“2016年夏季奥林匹克运动会某某比赛”。
{{Col-begin}}
{{Col-3}}
* {{GamesSport|田径}}
* {{GamesSport|自行车}}
{{col-3}}
* {{GamesSport|足球}}
* {{GamesSport|高尔夫球}}
{{col-3}}
* {{GamesSport|草地曲棍球}}
* {{GamesSport|壁球}}
{{col-end}}
加入竞赛数目
[编辑]每类运动之内的竞赛项目数亦可列出,方法是使用"Event=项目数"参数:
{{Col-begin}}
{{Col-3}}
* {{GamesSport|田径|Events=25}}
* {{GamesSport|自行车|Events=6}}
{{col-3}}
* {{GamesSport|足球|Events=1}}
* {{GamesSport|高尔夫球|Events=1}}
{{col-3}}
* {{GamesSport|草地曲棍球|Events=2}}
* {{GamesSport|壁球|Events=2}}
{{col-end}}
显示为:
cCancel pictogram
[编辑]The pictogram may be displayed if desired. This can be done with using the "Image=Yes" parameter as follows:
{{Col-begin}}
{{Col-3}}
* {{GamesSport|田径|Events=25|Image=no}}
* {{GamesSport|自行车|Events=6|Image=no}}
{{col-3}}
* {{GamesSport|足球|Events=1|Image=no}}
* {{GamesSport|高尔夫球|Events=1|Image=no}}
{{col-3}}
* {{GamesSport|草地曲棍球|Events=2|Image=no}}
* {{GamesSport|壁球|Events=2|Image=no}}
{{col-end}}
Would give you the following:
Displaying only single link to the details of the sport results may be done with using the "Format=d" parameter as follows:
链接为:[[夏季奧林匹克運動會{{{1}}}比賽]],如页页不存在将不会显示链接
{{Col-begin}}
{{Col-3}}
* {{GamesSport|田径|Events=25|Format=d}}
* {{GamesSport|自行车|Events=6|Format=d}}
{{col-3}}
* {{GamesSport|足球|Events=1|Format=d}}
* {{GamesSport|高尔夫球|Events=1|Format=d}}
{{col-3}}
* {{GamesSport|草地曲棍球|Events=2|Format=d}}
* {{GamesSport|壁球|Events=2|Format=d}}
{{col-end}}
Would give you the following:
See also
[编辑]- Template:GamesSport2 – as GamesSport template, but displays pictogram by default and uses just a single link to the details of the sport results (i.e. full analog of the GamesSport template with parameters Image=Yes|Format=d)
- Template:NoIcon – adding a blank space to align sports without relevant pictograms
无描述。
| 参数 | 描述 | 类型 | 状态 | |
|---|---|---|---|---|
| 运动 | 1 | 无描述 | 字符串 | 可选 |
| detailed | 2 | 无描述 | 未知 | 可选 |
| 图像 | Image | 无描述 | 文件 | 可选 |
| 链接格式 | Format | 无描述 | 未知 | 可选 |
| Events | Events | 无描述 | 未知 | 可选 |
| Competitors | Competitors | 无描述 | 未知 | 可选 |