Template:Golf18/doc: Difference between revisions
Tags: Mobile edit Mobile web edit |
m syntaxhighlight lang="wikitext" |
||
(19 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{Documentation subpage}} |
{{Documentation subpage}} |
||
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> |
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> |
||
{{Mobile view problem|explanation=Table caption is black on black, making its text unreadable.}} |
|||
= Usage = |
= Usage = |
||
The '''{{tl|Golf18}}''' template creates a table header for an 18-hole [[golf course]] scorecard. Additional rows are added to the table to show par for each hole, to show the hole [[ |
The '''{{tl|Golf18}}''' template creates a table header for an 18-hole [[golf course]] scorecard. Additional rows are added to the table to show par for each hole, to show the hole [[Stroke Index]] and to show the yardages for each [[teeing ground|tee]]. The set of templates used to create a golf scorecard are: |
||
{| border="1" cellpadding="5" |
{| border="1" cellpadding="5" |
||
Line 17: | Line 17: | ||
|- |
|- |
||
| {{tl|Handicap18}} |
| {{tl|Handicap18}} |
||
|style="background:khaki; color:black;"|'''[[ |
|style="background:khaki; color:black;"|'''[[Stroke Index|SI]]''' |
||
| Lists the |
| Lists the Stroke Index for each hole. |
||
|- |
|- |
||
| {{tl|Tee18}} |
| {{tl|Tee18}} |
||
Line 25: | Line 25: | ||
|- |
|- |
||
| {{tl|Black18}} |
| {{tl|Black18}} |
||
|style="background:black; color:white"| '''Black''' |
|style="background:black; color:white"| '''Black''' |
||
|rowspan= |
|rowspan=8| Colored templates for each of the common colors for tee markers. |
||
|- |
|- |
||
| {{tl|Blue18}} |
| {{tl|Blue18}} |
||
Line 48: | Line 48: | ||
| {{tl|Silver18}} |
| {{tl|Silver18}} |
||
|style="background:silver; color:black"| '''Silver''' |
|style="background:silver; color:black"| '''Silver''' |
||
|- |
|||
| {{tl|Bronze18}} |
|||
|style="background:#CD7F32;color:white"|'''Bronze''' |
|||
|- |
|||
| {{tl|Brown18}} |
|||
|style="background:brown;color:white"| '''Brown''' |
|||
|- |
|- |
||
| {{tl|End18}} |
| {{tl|End18}} |
||
Line 64: | Line 58: | ||
The following templates are an illustration of usage: |
The following templates are an illustration of usage: |
||
<syntaxhighlight lang="wikitext"> |
|||
<pre> |
|||
{{Golf18|center=true|title=South Course}} |
{{Golf18|center=true|title=South Course}} |
||
{{par18 | 4 | 4 | 3 | 4 | 4 | 5 | 4 | 3 | 5 | 36 | 4 | 3 | 4 | 5 | 4 | 4 | 3 | 4 | 5 | 36 | 72 }} |
{{par18 | 4 | 4 | 3 | 4 | 4 | 5 | 4 | 3 | 5 | 36 | 4 | 3 | 4 | 5 | 4 | 4 | 3 | 4 | 5 | 36 | 72 }} |
||
{{handicap18|name=Men's | 5 | 15| 13| 3 | 11| 9 | 1 | 17| 7 | 16| 14| 2 | 6 | 8 | 12| 18| 4 | 10 }} |
{{handicap18|name=Men's | 5 | 15| 13| 3 | 11| 9 | 1 | 17| 7 | 16| 14| 2 | 6 | 8 | 12| 18| 4 | 10 }} |
||
{{blue18 |78.1 / 143 |452|387|198|483|453|560|462|176|613|3784|405|221|504|541|435|477|227|442|571|3823|7607}} |
{{blue18 |78.1 / 143 |452|387|198|483|453|560|462|176|613|3784|405|221|504|541|435|477|227|442|571|3823|7607}} |
||
{{ |
{{tee18|Brown|bcolor=brown|tcolor=white|76.1 / 139 |444|362|160|471|404|530|442|164|590|3567|376|203|477|539|417|462|206|429|551|3660|7227}} |
||
{{white18 |74.3 / 136 |432|347|149|460|393|518|434|154|535|3422|362|193|456|521|404|392|192|419|524|3463|6885}} |
{{white18 |74.3 / 136 |432|347|149|460|393|518|434|154|535|3422|362|193|456|521|404|392|192|419|524|3463|6885}} |
||
{{green18 |rssize=8pt |M:72.5/133 W:79.2/138 |
{{green18 |rssize=8pt |M:72.5/133 W:79.2/138 |
||
Line 77: | Line 71: | ||
{{red18 |73.5 / 128 |368|281|113|388|324|452|381| 96|432|2835|299|105|394|408|276|286|176|347|416|2707|5542}} |
{{red18 |73.5 / 128 |368|281|113|388|324|452|381| 96|432|2835|299|105|394|408|276|286|176|347|416|2707|5542}} |
||
{{end18}} |
{{end18}} |
||
</syntaxhighlight> |
|||
</pre> |
|||
The {{tl|Golf18}} template creates the table header. Each line in the table is created by one of the other templates. The end of the scorecard is marked by a line that starts with <code>|}</code> to finish the table. Together these templates create: |
The {{tl|Golf18}} template creates the table header. Each line in the table is created by one of the other templates. The end of the scorecard is marked by a line that starts with <code>|}</code> to finish the table. Together these templates create: |
||
Line 85: | Line 79: | ||
{{handicap18|name=Men's | 5 | 15| 13| 3 | 11| 9 | 1 | 17| 7 | 16| 14| 2 | 6 | 8 | 12| 18| 4 | 10 }} |
{{handicap18|name=Men's | 5 | 15| 13| 3 | 11| 9 | 1 | 17| 7 | 16| 14| 2 | 6 | 8 | 12| 18| 4 | 10 }} |
||
{{black18 |78.1 / 143 |452|387|198|483|453|560|462|176|613|3784|405|221|504|541|435|477|227|442|571|3823|7607}} |
{{black18 |78.1 / 143 |452|387|198|483|453|560|462|176|613|3784|405|221|504|541|435|477|227|442|571|3823|7607}} |
||
{{ |
{{tee18|Brown|bcolor=brown|tcolor=white|76.1 / 139 |444|362|160|471|404|530|442|164|590|3567|376|203|477|539|417|462|206|429|551|3660|7227}} |
||
{{white18 |74.3 / 136 |432|347|149|460|393|518|434|154|535|3422|362|193|456|521|404|392|192|419|524|3463|6885}} |
{{white18 |74.3 / 136 |432|347|149|460|393|518|434|154|535|3422|362|193|456|521|404|392|192|419|524|3463|6885}} |
||
{{green18 |rssize=8pt |M:72.5/133 W:79.2/138 |
{{green18 |rssize=8pt |M:72.5/133 W:79.2/138 |
||
Line 107: | Line 101: | ||
;{{tl|Handicap18}} |
;{{tl|Handicap18}} |
||
:The Stroke Indexes for holes 1–18. (18 parameters) |
|||
:The hole handicap for holes 1–18. Note that hole handicaps are assigned with all of the odd numbers from 1–18 assigned to holes 1–9 and all of the even numbers assigned to holes 10–18. (18 parameters) |
|||
;{{tl|Tee18}} |
;{{tl|Tee18}} |
||
:The name of the tee (e.g. '''Regular''' or '''Blue'''), followed by the slope/rating, followed by the yardages for holes 1–9, followed by the yardage for the front 9, followed by the yardages for holes 10–18, followed by the yardage for the back 9, followed by the yardage for all 18 holes. |
:The name of the tee (e.g. '''Regular''' or '''Blue'''), followed by the slope/rating, followed by the yardages for holes 1–9, followed by the yardage for the front 9, followed by the yardages for holes 10–18, followed by the yardage for the back 9, followed by the yardage for all 18 holes. |
||
;{{tl|Black18}} {{tl|Blue18}} {{tl|White18}} {{tl|Yellow18}} {{tl|Red18}} {{tl|Green18}} {{tl|Gold18}} {{tl|Silver18 |
;{{tl|Black18}} {{tl|Blue18}} {{tl|White18}} {{tl|Yellow18}} {{tl|Red18}} {{tl|Green18}} {{tl|Gold18}} {{tl|Silver18}} |
||
:The slope/rating, followed by the yardages for holes 1–9, followed by the yardage for the front 9, followed by the yardages for holes 10–18, followed by the yardage for the back 9, followed by the yardage for all 18 holes. |
:The slope/rating, followed by the yardages for holes 1–9, followed by the yardage for the front 9, followed by the yardages for holes 10–18, followed by the yardage for the back 9, followed by the yardage for all 18 holes. |
||
Latest revision as of 23:00, 29 May 2023
This is a documentation subpage for Template:Golf18. It may contain usage information, categories and other content that is not part of the original template page. |
Usage
[edit]The {{Golf18}} template creates a table header for an 18-hole golf course scorecard. Additional rows are added to the table to show par for each hole, to show the hole Stroke Index and to show the yardages for each tee. The set of templates used to create a golf scorecard are:
Template | Default appearance | What it does |
---|---|---|
{{Golf18}} | Tee | Creates the table header and hole list. |
{{Par18}} | Par | Lists par for each hole, for each side of 9 holes and the total for 18 holes. |
{{Handicap18}} | SI | Lists the Stroke Index for each hole. |
{{Tee18}} | Name | Generic template for a set of tees. It lists the rating/slope for the tee and the yardage for each hole, for each side of 9 holes and the total for 18 holes. Typically, however, one of the templates based on tee color listed below are used instead of the generic template. |
{{Black18}} | Black | Colored templates for each of the common colors for tee markers. |
{{Blue18}} | Blue | |
{{White18}} | White | |
{{Yellow18}} | Yellow | |
{{Red18}} | Red | |
{{Green18}} | Green | |
{{Gold18}} | Gold | |
{{Silver18}} | Silver | |
{{End18}} | Ends the table |
Example
[edit]The following templates are an illustration of usage:
{{Golf18|center=true|title=South Course}}
{{par18 | 4 | 4 | 3 | 4 | 4 | 5 | 4 | 3 | 5 | 36 | 4 | 3 | 4 | 5 | 4 | 4 | 3 | 4 | 5 | 36 | 72 }}
{{handicap18|name=Men's | 5 | 15| 13| 3 | 11| 9 | 1 | 17| 7 | 16| 14| 2 | 6 | 8 | 12| 18| 4 | 10 }}
{{blue18 |78.1 / 143 |452|387|198|483|453|560|462|176|613|3784|405|221|504|541|435|477|227|442|571|3823|7607}}
{{tee18|Brown|bcolor=brown|tcolor=white|76.1 / 139 |444|362|160|471|404|530|442|164|590|3567|376|203|477|539|417|462|206|429|551|3660|7227}}
{{white18 |74.3 / 136 |432|347|149|460|393|518|434|154|535|3422|362|193|456|521|404|392|192|419|524|3463|6885}}
{{green18 |rssize=8pt |M:72.5/133 W:79.2/138
| 417|332|134|445|378|503|419|139|520|3287|347|178|441|506|389|377|177|404|509|3327|6615}}
{{par18 | 4 | 4 | 3 | 4 | 4 | 5 | 4 | 3 | 5 | 36 | 4 | 3 | 5 | 5 | 4 | 4 | 3 | 4 | 5 | 37 | 73 }}
{{handicap18|name=Women's| 7 | 13| 15| 9 | 11| 1 | 5 | 17| 3 | 10| 18| 2 | 6 | 14| 16| 12| 8 | 4 }}
{{red18 |73.5 / 128 |368|281|113|388|324|452|381| 96|432|2835|299|105|394|408|276|286|176|347|416|2707|5542}}
{{end18}}
The {{Golf18}} template creates the table header. Each line in the table is created by one of the other templates. The end of the scorecard is marked by a line that starts with |}
to finish the table. Together these templates create:
Tee | Rating/Slope | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Out | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | In | Total |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Par | 4 | 4 | 3 | 4 | 4 | 5 | 4 | 3 | 5 | 36 | 4 | 3 | 4 | 5 | 4 | 4 | 3 | 4 | 5 | 36 | 72 | |
SI | Men's | 5 | 15 | 13 | 3 | 11 | 9 | 1 | 17 | 7 | 16 | 14 | 2 | 6 | 8 | 12 | 18 | 4 | 10 | |||
Black | 78.1 / 143 | 452 | 387 | 198 | 483 | 453 | 560 | 462 | 176 | 613 | 3784 | 405 | 221 | 504 | 541 | 435 | 477 | 227 | 442 | 571 | 3823 | 7607 |
Brown | 76.1 / 139 | 444 | 362 | 160 | 471 | 404 | 530 | 442 | 164 | 590 | 3567 | 376 | 203 | 477 | 539 | 417 | 462 | 206 | 429 | 551 | 3660 | 7227 |
White | 74.3 / 136 | 432 | 347 | 149 | 460 | 393 | 518 | 434 | 154 | 535 | 3422 | 362 | 193 | 456 | 521 | 404 | 392 | 192 | 419 | 524 | 3463 | 6885 |
Green | M:72.5/133 W:79.2/138 | 417 | 332 | 134 | 445 | 378 | 503 | 419 | 139 | 520 | 3287 | 347 | 178 | 441 | 506 | 389 | 377 | 177 | 404 | 509 | 3327 | 6615 |
Par | 4 | 4 | 3 | 4 | 4 | 5 | 4 | 3 | 5 | 36 | 4 | 3 | 5 | 5 | 4 | 4 | 3 | 4 | 5 | 37 | 73 | |
SI | Women's | 7 | 13 | 15 | 9 | 11 | 1 | 5 | 17 | 3 | 10 | 18 | 2 | 6 | 14 | 16 | 12 | 8 | 4 | |||
Red | 73.5 / 128 | 368 | 281 | 113 | 388 | 324 | 452 | 381 | 96 | 432 | 2835 | 299 | 105 | 394 | 408 | 276 | 286 | 176 | 347 | 416 | 2707 | 5542 |
Parameters
[edit]Required parameters
[edit]All required parameters are determined by position only—there is no name (e.g. no name=value
form) associated with a required parameter.
- {{Golf18}}
- No required parameters.
- {{Par18}}
- The par for holes 1–9, followed by the par for the front 9, followed by the par for holes 10–18, followed by the par for the back 9, followed by the par for all 18 holes. (21 parameters)
- {{Handicap18}}
- The Stroke Indexes for holes 1–18. (18 parameters)
- {{Tee18}}
- The name of the tee (e.g. Regular or Blue), followed by the slope/rating, followed by the yardages for holes 1–9, followed by the yardage for the front 9, followed by the yardages for holes 10–18, followed by the yardage for the back 9, followed by the yardage for all 18 holes.
- {{Black18}} {{Blue18}} {{White18}} {{Yellow18}} {{Red18}} {{Green18}} {{Gold18}} {{Silver18}}
- The slope/rating, followed by the yardages for holes 1–9, followed by the yardage for the front 9, followed by the yardages for holes 10–18, followed by the yardage for the back 9, followed by the yardage for all 18 holes.
Optional parameters
[edit]All of the optional parameters are named—they use the form name=value
. The templates support the following optional parameters:
- bcolor (all templates)
- Overrides the default background color. Example:
bcolor=red
- tcolor (all templates)
- Overrides the default text color. Note that when used with {{Golf18}}, this also sets the default text color for any {{Par18}} and {{Handicap18}} templates in the scorecard. Example:
tcolor=white
- rssize (all templates)
- Overrides the size of the font used to display the rating/slope. When used with {{Golf18}}, this overrides the size of the font in the rating/slope column heading. Note that for {{Par18}} and {{Handicap18}}, there is no rating/slope text unless the optional name parameter is also provided. Examples:
rssize=8pt
orrssize=smallest
- name ({{Black18}}, {{Blue18}}, {{White18}}, {{Yellow18}}, {{Red18}}, {{Green18}}, {{Gold18}}, {{Silver18}}, {{Bronze18}}, and {{Brown18}})
- Overrides the default name of the tee. (The default name is the name of the tee color.) Example:
name=Championship
- name ({{Par18}} and {{Handicap18}})
- Provides a name in the rating/slope column to identify either the tee or whether the par/handicap is for men or women. Example:
name=Womens
- title ({{Golf18}})
- The table caption displayed centered over the top of the scorecard. If not specified then no title is displayed. Example:
title=South Course
- center ({{Golf18}})
- A boolean parameter—if set to a non-empty value, then the table is centered horizontally on the page. Example:
center=true