Difference between revisions of "Template:GamesSport/doc"
imported>Vanisaac m (→See also: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other) |
imported>Colonies Chris (minor fixes) |
||
| Line 16: | Line 16: | ||
Previously, each of these elements would need to be written out separately like the example below for the [[2010 South Asian Games]]: | Previously, each of these elements would need to be written out separately like the example below for the [[2010 South Asian Games]]: | ||
| − | {{ | + | {{div col|colwidth=22em}} |
| − | * [[Sport of athletics|Athletics]] ({{ | + | * [[Sport of athletics|Athletics]] ({{DetailsLink|Athletics at the 2010 South Asian Games}}) |
| − | * [[Cycling]] ({{ | + | * [[Cycling]] ({{DetailsLink|Cycling at the 2010 South Asian Games}}) |
| − | * [[Association football|Football]] ({{ | + | * [[Association football|Football]] ({{DetailsLink|Football at the 2010 South Asian Games}}) |
| − | * [[Golf]] ({{ | + | * [[Golf]] ({{DetailsLink|Golf at the 2010 South Asian Games}}) |
| − | * [[Field hockey|Hockey]] ({{ | + | * [[Field hockey|Hockey]] ({{DetailsLink|Hockey at the 2010 South Asian Games}}) |
| − | * [[Squash (sport)|Squash]] ({{ | + | * [[Squash (sport)|Squash]] ({{DetailsLink|Squash at the 2010 South Asian Games}}) |
| − | {{ | + | {{div col end}} |
<code><poem><nowiki> | <code><poem><nowiki> | ||
| − | {{ | + | {{div col|colwidth=22em}} |
| − | * [[Sport of athletics|Athletics]] ({{ | + | * [[Sport of athletics|Athletics]] ({{DetailsLink|Athletics at the 2010 South Asian Games}}) |
| − | * [[Cycling]] ({{ | + | * [[Cycling]] ({{DetailsLink|Cycling at the 2010 South Asian Games}}) |
| − | * [[Association football|Football]] ({{ | + | * [[Association football|Football]] ({{DetailsLink|Football at the 2010 South Asian Games}}) |
| − | * [[Golf]] ({{ | + | * [[Golf]] ({{DetailsLink|Golf at the 2010 South Asian Games}}) |
| − | * [[Field hockey|Hockey]] ({{ | + | * [[Field hockey|Hockey]] ({{DetailsLink|Hockey at the 2010 South Asian Games}}) |
| − | * [[Squash (sport)|Squash]] ({{ | + | * [[Squash (sport)|Squash]] ({{DetailsLink|Squash at the 2010 South Asian Games}}) |
| − | {{ | + | {{div col end}} |
</nowiki></poem></code> | </nowiki></poem></code> | ||
| Line 39: | Line 39: | ||
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''". | 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|Athletics}} | * {{GamesSport|Athletics}} | ||
* {{GamesSport|Cycling}} | * {{GamesSport|Cycling}} | ||
| Line 46: | Line 46: | ||
* {{GamesSport|Hockey}} | * {{GamesSport|Hockey}} | ||
* {{GamesSport|Squash}} | * {{GamesSport|Squash}} | ||
| − | {{ | + | {{div col end}} |
<code><poem><nowiki> | <code><poem><nowiki> | ||
| − | {{ | + | {{div col|colwidth=22em}} |
* {{GamesSport|Athletics}} | * {{GamesSport|Athletics}} | ||
* {{GamesSport|Cycling}} | * {{GamesSport|Cycling}} | ||
| Line 56: | Line 56: | ||
* {{GamesSport|Hockey}} | * {{GamesSport|Hockey}} | ||
* {{GamesSport|Squash}} | * {{GamesSport|Squash}} | ||
| − | {{ | + | {{div col end}} |
</nowiki></poem></code> | </nowiki></poem></code> | ||
| Line 62: | Line 62: | ||
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: | 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: | ||
<code><poem><nowiki> | <code><poem><nowiki> | ||
| − | {{ | + | {{div col|colwidth=22em}} |
* {{GamesSport|Athletics|Events=25}} | * {{GamesSport|Athletics|Events=25}} | ||
* {{GamesSport|Cycling|Events=6}} | * {{GamesSport|Cycling|Events=6}} | ||
| Line 69: | Line 69: | ||
* {{GamesSport|Hockey|Events=2}} | * {{GamesSport|Hockey|Events=2}} | ||
* {{GamesSport|Squash|Events=2}} | * {{GamesSport|Squash|Events=2}} | ||
| − | {{ | + | {{div col end}} |
</nowiki></poem></code> | </nowiki></poem></code> | ||
Would give you the following: | Would give you the following: | ||
| − | {{ | + | {{div col|colwidth=22em}} |
* {{GamesSport|Athletics|Events=25}} | * {{GamesSport|Athletics|Events=25}} | ||
* {{GamesSport|Cycling|Events=6}} | * {{GamesSport|Cycling|Events=6}} | ||
| Line 80: | Line 80: | ||
* {{GamesSport|Hockey|Events=2}} | * {{GamesSport|Hockey|Events=2}} | ||
* {{GamesSport|Squash|Events=2}} | * {{GamesSport|Squash|Events=2}} | ||
| − | {{ | + | {{div col end}} |
===Removing pictogram=== | ===Removing pictogram=== | ||
The pictogram may be removed if desired. This can be done with using the "''Image='''No'''''" parameter as follows: | The pictogram may be removed if desired. This can be done with using the "''Image='''No'''''" parameter as follows: | ||
<code><poem><nowiki> | <code><poem><nowiki> | ||
| − | {{ | + | {{div col|colwidth=22em}} |
* {{GamesSport|Athletics|Events=25|Image=No}} | * {{GamesSport|Athletics|Events=25|Image=No}} | ||
* {{GamesSport|Cycling|Events=6|Image=No}} | * {{GamesSport|Cycling|Events=6|Image=No}} | ||
| Line 92: | Line 92: | ||
* {{GamesSport|Hockey|Events=2|Image=No}} | * {{GamesSport|Hockey|Events=2|Image=No}} | ||
* {{GamesSport|Squash|Events=2|Image=No}} | * {{GamesSport|Squash|Events=2|Image=No}} | ||
| − | {{ | + | {{div col end}} |
</nowiki></poem></code> | </nowiki></poem></code> | ||
Would give you the following: | Would give you the following: | ||
| − | {{ | + | {{div col|colwidth=22em}} |
* {{GamesSport|Athletics|Events=25|Image=No}} | * {{GamesSport|Athletics|Events=25|Image=No}} | ||
* {{GamesSport|Cycling|Events=6|Image=No}} | * {{GamesSport|Cycling|Events=6|Image=No}} | ||
| Line 103: | Line 103: | ||
* {{GamesSport|Hockey|Events=2|Image=No}} | * {{GamesSport|Hockey|Events=2|Image=No}} | ||
* {{GamesSport|Squash|Events=2|Image=No}} | * {{GamesSport|Squash|Events=2|Image=No}} | ||
| − | {{ | + | {{div col end}} |
===Changing listing format=== | ===Changing listing format=== | ||
The listing format may be changed if desired. Displaying only single link to the '''m'''ain sport may be done with using the "''Format='''m'''''" parameter as follows: | The listing format may be changed if desired. Displaying only single link to the '''m'''ain sport may be done with using the "''Format='''m'''''" parameter as follows: | ||
<code><poem><nowiki> | <code><poem><nowiki> | ||
| − | {{ | + | {{div col|colwidth=22em}} |
* {{GamesSport|Athletics|Events=25|Format=m}} | * {{GamesSport|Athletics|Events=25|Format=m}} | ||
* {{GamesSport|Cycling|Events=6|Format=m}} | * {{GamesSport|Cycling|Events=6|Format=m}} | ||
| Line 115: | Line 115: | ||
* {{GamesSport|Hockey|Events=2|Format=m}} | * {{GamesSport|Hockey|Events=2|Format=m}} | ||
* {{GamesSport|Squash|Events=2|Format=m}} | * {{GamesSport|Squash|Events=2|Format=m}} | ||
| − | {{ | + | {{div col end}} |
</nowiki></poem></code> | </nowiki></poem></code> | ||
Would give you the following: | Would give you the following: | ||
| − | {{ | + | {{div col|colwidth=22em}} |
* {{GamesSport|Athletics|Events=25|Format=m}} | * {{GamesSport|Athletics|Events=25|Format=m}} | ||
* {{GamesSport|Cycling|Events=6|Format=m}} | * {{GamesSport|Cycling|Events=6|Format=m}} | ||
| Line 126: | Line 126: | ||
* {{GamesSport|Hockey|Events=2|Format=m}} | * {{GamesSport|Hockey|Events=2|Format=m}} | ||
* {{GamesSport|Squash|Events=2|Format=m}} | * {{GamesSport|Squash|Events=2|Format=m}} | ||
| − | {{ | + | {{div col end}} |
Displaying only single link to the '''d'''etails of the sport results may be done with using the "''Format='''d'''''" parameter as follows: | Displaying only single link to the '''d'''etails of the sport results may be done with using the "''Format='''d'''''" parameter as follows: | ||
<code><poem><nowiki> | <code><poem><nowiki> | ||
| − | {{ | + | {{div col|colwidth=22em}} |
* {{GamesSport|Athletics|Events=25|Format=d}} | * {{GamesSport|Athletics|Events=25|Format=d}} | ||
* {{GamesSport|Cycling|Events=6|Format=d}} | * {{GamesSport|Cycling|Events=6|Format=d}} | ||
| Line 137: | Line 137: | ||
* {{GamesSport|Hockey|Events=2|Format=d}} | * {{GamesSport|Hockey|Events=2|Format=d}} | ||
* {{GamesSport|Squash|Events=2|Format=d}} | * {{GamesSport|Squash|Events=2|Format=d}} | ||
| − | {{ | + | {{div col end}} |
</nowiki></poem></code> | </nowiki></poem></code> | ||
Would give you the following: | Would give you the following: | ||
| − | {{ | + | {{div col|colwidth=22em}} |
* {{GamesSport|Athletics|Events=25|Format=d}} | * {{GamesSport|Athletics|Events=25|Format=d}} | ||
* {{GamesSport|Cycling|Events=6|Format=d}} | * {{GamesSport|Cycling|Events=6|Format=d}} | ||
| Line 148: | Line 148: | ||
* {{GamesSport|Hockey|Events=2|Format=d}} | * {{GamesSport|Hockey|Events=2|Format=d}} | ||
* {{GamesSport|Squash|Events=2|Format=d}} | * {{GamesSport|Squash|Events=2|Format=d}} | ||
| − | {{ | + | {{div col end}} |
==See also== | ==See also== | ||
Latest revision as of 08:26, 21 August 2020
| 40px | This is a documentation subpage for Template:GamesSport. It contains usage information, categories and other content that is not part of the original template page. |
The GamesSport template 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:
- a link to the main article of that sport
- a link to the detailed summary or results of that sport at that event.
- 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 "football" directs to association football and "hockey" directs to field hockey.
Contents
Plain example (without GamesSport)
Previously, each of these elements would need to be written out separately like the example below for the 2010 South Asian Games:
{{div col|colwidth=22em}}
* [[Sport of athletics|Athletics]] ({{DetailsLink|Athletics at the 2010 South Asian Games}})
* [[Cycling]] ({{DetailsLink|Cycling at the 2010 South Asian Games}})
* [[Association football|Football]] ({{DetailsLink|Football at the 2010 South Asian Games}})
* [[Golf]] ({{DetailsLink|Golf at the 2010 South Asian Games}})
* [[Field hockey|Hockey]] ({{DetailsLink|Hockey at the 2010 South Asian Games}})
* [[Squash (sport)|Squash]] ({{DetailsLink|Squash at the 2010 South Asian Games}})
{{div col end}}
With GamesSport
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|Athletics}}
* {{GamesSport|Cycling}}
* {{GamesSport|Football}}
* {{GamesSport|Golf}}
* {{GamesSport|Hockey}}
* {{GamesSport|Squash}}
{{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|Athletics|Events=25}}
* {{GamesSport|Cycling|Events=6}}
* {{GamesSport|Football|Events=1}}
* {{GamesSport|Golf|Events=1}}
* {{GamesSport|Hockey|Events=2}}
* {{GamesSport|Squash|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|Athletics|Events=25|Image=No}}
* {{GamesSport|Cycling|Events=6|Image=No}}
* {{GamesSport|Football|Events=1|Image=No}}
* {{GamesSport|Golf|Events=1|Image=No}}
* {{GamesSport|Hockey|Events=2|Image=No}}
* {{GamesSport|Squash|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|Athletics|Events=25|Format=m}}
* {{GamesSport|Cycling|Events=6|Format=m}}
* {{GamesSport|Football|Events=1|Format=m}}
* {{GamesSport|Golf|Events=1|Format=m}}
* {{GamesSport|Hockey|Events=2|Format=m}}
* {{GamesSport|Squash|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|Athletics|Events=25|Format=d}}
* {{GamesSport|Cycling|Events=6|Format=d}}
* {{GamesSport|Football|Events=1|Format=d}}
* {{GamesSport|Golf|Events=1|Format=d}}
* {{GamesSport|Hockey|Events=2|Format=d}}
* {{GamesSport|Squash|Events=2|Format=d}}
{{div col end}}
Would give you the following:
- 20px [[Athletics Template:Str mid|Athletics]] (25)
- 20px [[Cycling Template:Str mid|Cycling]] (6)
- 20px [[Football Template:Str mid|Football]] (1)
- 20px [[Golf Template:Str mid|Golf]] (1)
- 20px [[Hockey Template:Str mid|Hockey]] (2)
- 20px [[Squash Template:Str mid|Squash]] (2)
See also