Jump to content

Template:Golf18/doc: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
SineBot (talk | contribs)
m Signing comment by 68.84.251.94 - "Example: "
m syntaxhighlight lang="wikitext"
 
(41 intermediate revisions by 12 users not shown)
Line 1: Line 1:
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->

= 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 [[golf handicap|handicaps]] and to show the yardages for each [[teeing ground|tee]]. The set of templates used to create a golf scorecard are:
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 14: Line 17:
|-
|-
| {{tl|Handicap18}}
| {{tl|Handicap18}}
|style="background:khaki; color:black;"|'''[[Golf handicap|Handicap]]'''
|style="background:khaki; color:black;"|'''[[Stroke Index|SI]]'''
| Lists the hole handicap for each hole.
| Lists the Stroke Index for each hole.
|-
|-
| {{tl|Tee18}}
| {{tl|Tee18}}
|style="background:white; color:black;"|'''''Name'''''
|style="background:white; color:black;"|'''''Name'''''
| Generic template for a set of tees. It lists the [[Golf handicap#Course rating|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.
| Generic template for a set of tees. It lists the [[Golf handicap#Course rating|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.
|-
|-
| {{tl|Black18}}
| {{tl|Black18}}
|style="background:black; color:white"| '''Black'''
|style="background:black; color:white"| '''Black'''
|rowspan=8| Colored templates for each of the common colors for tee markers.
|rowspan=8| Colored templates for each of the common colors for tee markers.
|-
|-
Line 45: Line 48:
| {{tl|Silver18}}
| {{tl|Silver18}}
|style="background:silver; color:black"| '''Silver'''
|style="background:silver; color:black"| '''Silver'''
|-
| {{tl|End18}}
|
| Ends the table
|}
|}


Line 51: 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=main }}
{{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=Mens | 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}}
{{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 |76.1 / 139 |444|362|160|471|404|530|442|164|590|3567|376|203|477|539|417|462|206|429|551|3660|7227}}
{{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
| 417|332|134|445|378|503|419|139|520|3287|347|178|441|506|389|377|177|404|509|3327|6615}}
| 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 }}
{{par18 | 4 | 4 | 3 | 4 | 4 | 5 | 4 | 3 | 5 | 36 | 4 | 3 | 5 | 5 | 4 | 4 | 3 | 4 | 5 | 37 | 73 }}
{{handicap18|name=Womens| 7 | 13| 15| 9 | 11| 1 | 5 | 17| 3 | 10| 18| 2 | 6 | 14| 16| 12| 8 | 4 }}
{{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}}
{{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}}
|}
</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 <tt>|}</tt> 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:


{{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=Mens | 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}}
{{blue18 |76.1 / 139 |444|362|160|471|404|530|442|164|590|3567|376|203|477|539|417|462|206|429|551|3660|7227}}
{{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
| 417|332|134|445|378|503|419|139|520|3287|347|178|441|506|389|377|177|404|509|3327|6615}}
| 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 }}
{{par18 | 4 | 4 | 3 | 4 | 4 | 5 | 4 | 3 | 5 | 36 | 4 | 3 | 5 | 5 | 4 | 4 | 3 | 4 | 5 | 37 | 73 }}
{{handicap18|name=Womens| 7 | 13| 15| 9 | 11| 1 | 5 | 17| 3 | 10| 18| 2 | 6 | 14| 16| 12| 8 | 4 }}
{{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}}
{{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}}
|}

{{Golf18|center=true|title=Wikipedia CC
{{par18 | 4 | 3 | 4 | 5 | 3 | 4
{{championship18|76.5/143|423|185|459|549|171|466
{{black18 |74.0/137|399|168|413|517|155|450
{{silver18 |73.3/130|366|160|400|498|144|418
{{green18 |72.1/121|341|136|358|452|118|393
{{par18 | 4 | 3 | 4 | 5 | 3 | 4
{{red18 |71.9/122|290|121|334|418|94 |378 <span style="font-size: smaller;" class="autosigned">—Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/68.84.251.94|68.84.251.94]] ([[User talk:68.84.251.94|talk]]) 21:37, 6 February 2010 (UTC)</span><!-- Template:UnsignedIP --> <!--Autosigned by SineBot-->


== Parameters ==
== Parameters ==
Line 94: Line 92:
=== Required parameters ===
=== Required parameters ===


All required parameters are determined by position only&mdash;there is no name (e.g. no <tt>name=value</tt> form) associated with a required parameter.
All required parameters are determined by position only&mdash;there is no name (e.g. no <code>name=value</code> form) associated with a required parameter.


;{{tl|Golf18}}
;{{tl|Golf18}}
Line 103: Line 101:


;{{tl|Handicap18}}
;{{tl|Handicap18}}
:The Stroke Indexes for holes 1&ndash;18. (18 parameters)
:The hole handicap for holes 1&ndash;18. Note that hole handicaps are assigned with all of the odd numbers from 1&ndash18 assigned to holes 1&ndash;9 and all of the even numbers assigned to holes 10&ndash;18. (18 parameters)


;{{tl|Tee18}}
;{{tl|Tee18}}
Line 113: Line 111:
=== Optional parameters ===
=== Optional parameters ===


All of the optional parameters are named&mdash;they use the form <tt>name=value</tt>. The templates support the following optional parameters:
All of the optional parameters are named&mdash;they use the form <code>name=value</code>. The templates support the following optional parameters:


;bcolor (all templates)
;bcolor (all templates)
:Overrides the default background color. Example: <tt>bcolor=red</tt>
:Overrides the default background color. Example: <code>bcolor=red</code>


;tcolor (all templates)
;tcolor (all templates)
:Overrides the default text color. Note that when used with {{tl|Golf18}}, this also sets the default text color for any {{tl|Par18}} and {{tl|Handicap18}} templates in the scorecard. Example: <tt>tcolor=white</tt>
:Overrides the default text color. Note that when used with {{tl|Golf18}}, this also sets the default text color for any {{tl|Par18}} and {{tl|Handicap18}} templates in the scorecard. Example: <code>tcolor=white</code>


;rssize (all templates)
;rssize (all templates)
:Overrides the size of the font used to display the rating/slope. When used with {{tl|Golf18}}, this overrides the size of the font in the rating/slope column heading. Note that for {{tl|Par18}} and {{tl|Handicap18}}, there is no rating/slope text unless the optional '''name''' parameter is also provided. Examples: <tt>rssize=8pt</tt> or <tt>rssize=smallest</tt>
:Overrides the size of the font used to display the rating/slope. When used with {{tl|Golf18}}, this overrides the size of the font in the rating/slope column heading. Note that for {{tl|Par18}} and {{tl|Handicap18}}, there is no rating/slope text unless the optional '''name''' parameter is also provided. Examples: <code>rssize=8pt</code> or <code>rssize=smallest</code>


;name ({{tl|Black18}}, {{tl|Blue18}}, {{tl|White18}}, {{tl|Yellow18}}, {{tl|Red18}}, {{tl|Green18}}, {{tl|Gold18}}, and {{tl|Silver18}})
;name ({{tl|Black18}}, {{tl|Blue18}}, {{tl|White18}}, {{tl|Yellow18}}, {{tl|Red18}}, {{tl|Green18}}, {{tl|Gold18}}, {{tl|Silver18}}, {{tl|Bronze18}}, and {{tl|Brown18}})
:Overrides the default name of the tee. (The default name is the name of the tee color.) Example: <tt>name=Championship</tt>
:Overrides the default name of the tee. (The default name is the name of the tee color.) Example: <code>name=Championship</code>


;name ({{tl|Par18}} and {{tl|Handicap18}})
;name ({{tl|Par18}} and {{tl|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: <tt>name=Womens</tt>
:Provides a name in the rating/slope column to identify either the tee or whether the par/handicap is for men or women. Example: <code>name=Womens</code>


;title ({{tl|Golf18}})
;title ({{tl|Golf18}})
:The table caption displayed centered over the top of the scorecard. If not specified then no title is displayed. Example: <tt>title=South Course</tt>
:The table caption displayed centered over the top of the scorecard. If not specified then no title is displayed. Example: <code>title=South Course</code>


;center ({{tl|Golf18}})
;center ({{tl|Golf18}})
:A boolean parameter&mdash;if set to a non-empty value, then the table is centered horizontally on the page. Example: <tt>center=true</tt>
:A boolean parameter&mdash;if set to a non-empty value, then the table is centered horizontally on the page. Example: <code>center=true</code>

<includeonly>{{Sandbox other||
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
[[Category:Golf scorecard templates]]
}}</includeonly>

Latest revision as of 23:00, 29 May 2023

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:

South Course
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 or rssize=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