[[{{{1}}}]] (รายละเอียด)

Documentation icon คู่มือการใช้งานแม่แบบ[ดู] [แก้] [ประวัติ] [ล้างแคช]

แม่แบบ:GamesSport is for usage on main multi-sport event articles only. The purpose of this template is to radically simplify the listing of sports on multi-sport event articles.

Typically, such articles will have a list of the sports held at the event and each listing comprises three or four parts:

  1. a link to the main article of that sport
  2. a link to the detailed summary or results of that sport at that event.
  3. a figure denoting the total number of events held within that sport during the games

The GamesSport template allows you to render all these elements by simply entering the name of the sport. Its basic usage is:

  • {{GamesSport|SPORT}}

Note that the template uses International Olympic Committee naming conventions, so "ฟุตบอล" directs to association ฟุตบอล and "ฮอกกี้" directs to field ฮอกกี้.

การใช้งาน แก้

This information can be rendered much more easily with the GamesSport template as it removes the need to spend time finding the correct article for each sport and its corresponding pictogram. The link to the results works off the name of the article in which it is placed. Therefore, if you use the template here it links to "SPORT at the GamesSport/doc"; on the 2008 Summer Olympics article it would link to "SPORT at the 2008 Summer Olympics".

{{div col|colwidth=22em}}
* {{GamesSport|กรีฑา}}
* {{GamesSport|จักรยาน}}
* {{GamesSport|ฟุตบอล}}
* {{GamesSport|กอล์ฟ}}
* {{GamesSport|ฮอกกี้}}
* {{GamesSport|สควอช}}
{{div col end}}

Adding number of events แก้

The number of events contested within each sport may be listed if desired. This can be done with using the "Event=<number of events>" parameter as follows:

{{div col|colwidth=22em}}
* {{GamesSport|กรีฑา|Events=25}}
* {{GamesSport|จักรยาน|Events=6}}
* {{GamesSport|ฟุตบอล|Events=1}}
* {{GamesSport|กอล์ฟ|Events=1}}
* {{GamesSport|ฮอกกี้|Events=2}}
* {{GamesSport|สควอช|Events=2}}
{{div col end}}

Would give you the following:

Removing pictogram แก้

The pictogram may be removed if desired. This can be done with using the "Image=No" parameter as follows:

{{div col|colwidth=22em}}
* {{GamesSport|กรีฑา|Events=25|Image=No}}
* {{GamesSport|จักรยาน|Events=6|Image=No}}
* {{GamesSport|ฟุตบอล|Events=1|Image=No}}
* {{GamesSport|กอล์ฟ|Events=1|Image=No}}
* {{GamesSport|ฮอกกี้|Events=2|Image=No}}
* {{GamesSport|สควอช|Events=2|Image=No}}
{{div col end}}

Would give you the following:

Changing listing format แก้

The listing format may be changed if desired. Displaying only single link to the main sport may be done with using the "Format=m" parameter as follows:

{{div col|colwidth=22em}}
* {{GamesSport|กรีฑา|Events=25|Format=m}}
* {{GamesSport|จักรยาน|Events=6|Format=m}}
* {{GamesSport|ฟุตบอล|Events=1|Format=m}}
* {{GamesSport|กอล์ฟ|Events=1|Format=m}}
* {{GamesSport|ฮอกกี้|Events=2|Format=m}}
* {{GamesSport|สควอช|Events=2|Format=m}}
{{div 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:

{{div col|colwidth=22em}}
* {{GamesSport|กรีฑา|Events=25|Format=d}}
* {{GamesSport|จักรยาน|Events=6|Format=d}}
* {{GamesSport|ฟุตบอล|Events=1|Format=d}}
* {{GamesSport|กอล์ฟ|Events=1|Format=d}}
* {{GamesSport|ฮอกกี้|Events=2|Format=d}}
* {{GamesSport|สควอช|Events=2|Format=d}}
{{div col end}}

Would give you the following:

ดูเพิ่ม แก้