模板: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 | 沒有描述 | 不明 | 非必填 |