Difference between revisions of "Template:Infobox golf facility/doc"

From blackwiki
Jump to navigation Jump to search
(→‎Empty syntax: Added Courses 5-8)
imported>Vanisaac
m (→‎TemplateData: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other)
 
(49 intermediate revisions by 22 users not shown)
Line 1: Line 1:
<includeonly>{{template doc page transcluded}}</includeonly><noinclude>{{template doc page viewed directly}}</noinclude>
+
{{Documentation subpage}}
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
+
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
 +
{{Lua|Module:Infobox|Module:InfoboxImage|Module:Coordinates|Module:Check for unknown parameters}}
  
==Empty syntax==
+
== Usage ==
<pre>
+
{{Generic template demo
{{Infobox_Golf_Facility
+
| name
|golf_facility_name =
+
| image
|image =
+
| image_size
|imagesize =
+
| alt
|caption =
+
| caption
|location =  
+
 
|coordinates = <!-- use {{coord}} --!>
+
| pushpin_map = World
|establishment = <!-- year -->
+
| pushpin_relief = 1
|type = <!-- public/private-->
+
| <!-- pushpin_mapsize -->
|owner = <!-- name of organization/company -->
+
| <!-- pushpin_map_alt -->
|operator = <!-- name of organization/company -->
+
| pushpin_map_caption
|holes =  <!-- total number of holes at club/resort-->
+
 
|tournaments = <!-- regualar tournaments held if any-->
+
| coordinates = {{coord|1|2}}
|website =
+
 
|course1 = <!-- individual course name, can leave blank if same as article title-->
+
| location
|designer1 =
+
| establishment
|par1 =
+
| type
|length1 =
+
| owner
|rating1 =
+
| operator
|record1 =
+
| holes
|course2 = <!-- if only one course: leave this entry and all below parts blank -->
+
| tournaments
|designer2 =
+
| greens
|par2 =
+
| fairways
|length2 =
+
| website
|rating2 =
+
 
|record2 =
+
| course1
|course3 =
+
| designer1
|designer3 =
+
| par1
|par3 =
+
| length1
|length3 =
+
| rating1
|rating3 =
+
| slope1
|record3 =
+
| record1
|course4 =
+
 
|designer4 =
+
| course2
|par4 =  
+
| designer2
|length4 =
+
| par2
|rating4 =
+
| length2
|record4 =
+
| rating2
|course5 =
+
| slope2
|designer5 =
+
| record2
|par5 =  
+
 
|length5 =
+
| course3
|rating5 =
+
| designer3
|record5 =
+
| par3
|course6 =
+
| length3
|designer6 =
+
| rating3
|par6 =  
+
| slope3
|length6 =
+
| record3
|rating6 =
+
 
|record6 =
+
| course4
|course7 =
+
| designer4
|designer7 =
+
| par4
|par7 =  
+
| length4
|length7 =
+
| rating4
|rating7 =
+
| slope4
|record7 =
+
| record4
|course8 =
+
 
|designer8 =
+
| course5
|par8 =  
+
| designer5
|length8 =
+
| par5
|rating8 =
+
| length5
|record8 =
+
| rating5
|image2 =  
+
| slope5
|imagesize2=
+
| record5
|caption2 =
+
 
 +
| course6
 +
| designer6
 +
| par6
 +
| length6
 +
| rating6
 +
| slope6
 +
| record6
 +
 
 +
| course7
 +
| designer7
 +
| par7
 +
| length7
 +
| rating7
 +
| slope7
 +
| record7
 +
 
 +
| course8
 +
| designer8
 +
| par8
 +
| length8
 +
| rating8
 +
| slope8
 +
| record8
 +
 
 +
| course9
 +
| designer9
 +
| par9
 +
| length9
 +
| rating9
 +
| slope9
 +
| record9
 +
 
 +
| module = {{{module}}}<br/>''or:'' {{{embedded}}}<br/>''or:'' {{{nrhp}}}
 +
| image2
 +
| imagesize2
 +
| caption2
 +
}}
 +
 
 +
<pre style="overflow:auto">
 +
{{Infobox golf facility
 +
| name                = <!-- name of the facility -->
 +
| image              = <!-- just name file name, no [[image:]] or size required -->
 +
| imagesize          = <!-- include units -->
 +
| caption            =  
 +
| pushpin_map        = <!-- name of a location map (see Template:Location map) -->
 +
| pushpin_relief      = <!-- any non-blank value to display relief map, if available -->
 +
| pushpin_mapsize    = <!-- width of map (e.g., 220 without the px), default is 250 -->
 +
| pushpin_map_alt    = <!-- alternative text for map, see WP:ALT for details -->
 +
| pushpin_map_caption = <!-- text displayed below map, overrides default caption -->
 +
| coordinates        =  
 +
| location            =  
 +
| establishment      = <!-- year -->
 +
| type                = <!-- public/private -->
 +
| owner              = <!-- name of organization/company -->
 +
| operator            = <!-- name of organization/company -->
 +
| holes              = <!-- total number of holes at club/resort -->
 +
| tournaments        = <!-- notable tournaments held (if any) -->
 +
| greens              = <!-- type of grass used -->
 +
| fairways            = <!-- type of grass used -->
 +
| website            =  
 +
| course1            = <!-- individual course name, can leave blank if same as article title -->
 +
| designer1          =  
 +
| par1                =
 +
| length1            =  
 +
| rating1            =  
 +
| slope1              =
 +
| record1            =  
 +
| module              = <!-- or 'embedded' or 'nrhp' -->
 +
| image2             = <!-- a second image -->
 +
| imagesize2         =  
 +
| caption2           =  
 
}}
 
}}
 
</pre>
 
</pre>
  
==Coordinates==
+
=== Additional courses ===
 +
To add additional courses (up to 8 total) use
 +
<pre style="overflow:auto">
 +
| course2            = <!-- if only one course: leave this entry and all below parts blank -->
 +
| designer2          =
 +
| par2              =
 +
| length2            =
 +
| rating2            =
 +
| slope2            =
 +
| record2            =
 +
</pre>
 +
<pre style="overflow:auto">
 +
| course3            =
 +
| designer3          =
 +
| par3              =
 +
| length3            =
 +
| rating3            =
 +
| slope3            =
 +
| record3            =
 +
</pre>
 +
<pre style="overflow:auto">
 +
| course4            =
 +
| designer4          =
 +
| par4              =
 +
| length4            =
 +
| rating4            =
 +
| slope4            =
 +
| record4            =
 +
</pre>
 +
<pre style="overflow:auto">
 +
| course5            =
 +
| designer5          =
 +
| par5              =
 +
| length5            =
 +
| rating5            =
 +
| slope5            =
 +
| record5            =
 +
</pre>
 +
<pre style="overflow:auto">
 +
| course6            =
 +
| designer6          =
 +
| par6              =
 +
| length6            =
 +
| rating6            =
 +
| slope6            =
 +
| record6            =
 +
</pre>
 +
<pre style="overflow:auto">
 +
| course7            =
 +
| designer7          =
 +
| par7              =
 +
| length7            =
 +
| rating7            =
 +
| slope7            =
 +
| record7            =
 +
</pre>
 +
<pre style="overflow:auto">
 +
| course8            =
 +
| designer8          =
 +
| par8              =
 +
| length8            =
 +
| rating8            =
 +
| slope8            =
 +
| record8            =
 +
</pre>
 +
 
 +
=== Embedding other templates ===
 +
The <code>module=</code>, <code>embedded=</code>, or <code>nrhp=</code> parameters can be used for embedding other templates into this infobox (see [[Wikipedia:Infobox modules]]):
 +
<pre style="overflow:auto">
 +
{{Infobox golf facility
 +
| name =
 +
...
 +
| module = <!-- or 'embedded' or 'nrhp' -->
 +
  {{Infobox ABC
 +
  | embed = yes <!-- or 'child=yes' or 'subbox=yes' -->
 +
  ...
 +
  }}
 +
}}
 +
</pre>
 +
 
 +
=== Coordinates ===
 
{{UF-coord}}
 
{{UF-coord}}
  
==Microformat==
+
== Microformat ==
 
{{UF-hcard-geo}}
 
{{UF-hcard-geo}}
  
<includeonly>
+
== Tracking category ==
<!-- ADD CATEGORIES BELOW THIS LINE -->
+
* {{clc|Pages using infobox golf facility with unknown parameters}}
 +
 
 +
== TemplateData ==
 +
{{TemplateData header}}
 +
<templatedata>
 +
{
 +
"description": "This is an infobox to describe individual golf courses.",
 +
"params": {
 +
"name": {
 +
"label": "Name",
 +
"type": "string",
 +
"default": "default value",
 +
"description": "The name of the facility"
 +
},
 +
"image": {
 +
"label": "Picture of course",
 +
"type": "string/wiki-page-name",
 +
"description": "A representative picture of the facility; just add the filename of a picture."
 +
},
 +
"imagesize": {
 +
"label": "Picture Size",
 +
"type": "string",
 +
"description": "Provide the unit in the value; for instance, \"98 pixels\""
 +
},
 +
"caption": {
 +
"label": "Caption for picture",
 +
"type": "string"
 +
},
 +
"establishment": {
 +
"label": "Year course established",
 +
"type": "number"
 +
},
 +
"type": {
 +
"label": "Type of course",
 +
"type": "string",
 +
"description": "Typically only \"Public\" or \"Private\"."
 +
},
 +
"owner": {
 +
"label": "Owner of course",
 +
"type": "string",
 +
"description": "This is the owner of the golf course; if the owner has a wikipedia entry, markup with \"[[\" and \"]]\"."
 +
},
 +
"operator": {
 +
"label": "Operator of course",
 +
"type": "string",
 +
"description": "This is the operator of the golf course; if the owner has a wikipedia entry, markup with \"[[\" and \"]]\"."
 +
},
 +
"holes": {
 +
"label": "Holes count",
 +
"type": "number",
 +
"description": "Number of holes in the course (e.g. 18)"
 +
                },
 +
"greens": {
 +
"label": "Greens",
 +
"type": "string",
 +
"description": "Type of grass used"
 +
                },
 +
"fairways": {
 +
"label": "Fairways",
 +
"type": "string",
 +
"description": "Type of grass used"
 +
},
 +
"tournaments": {
 +
"label": "Tournaments held at course",
 +
"type": "string",
 +
"description": "The tournaments listed should be notable, meaning they have wikipedia entries for them (markup with \"[[\" and \"]]\")"
 +
},
 +
"website": {
 +
"label": "Website",
 +
"type": "string",
 +
"description": "If there is a website for the course, add it here."
 +
}
 +
}
 +
}
 +
</templatedata>
 +
 
 +
The following parameters have not been added to the templatedata yet:
 +
* pushpin_map        = <!-- name of a location map (see Template:Location map) -->
 +
* pushpin_relief      = <!-- any non-blank value to display relief map, if available -->
 +
* pushpin_mapsize    = <!-- width of map (e.g., 220 without the px), default is 250 -->
 +
* pushpin_map_alt    = <!-- alternative text for map, see WP:ALT for details -->
 +
* pushpin_map_caption = <!-- text displayed below map, overrides default caption -->
 +
* coordinates        =
 +
* location            =
 +
* course1            = <!-- individual course name, can leave blank if same as article title -->
 +
* designer1          =
 +
* par1                =
 +
* length1            =
 +
* rating1            =
 +
* slope1              =
 +
* record1            =
 +
* image2              = <!-- a second image -->
 +
* imagesize2          =
 +
* caption2            =
 +
 
 +
<includeonly>{{Sandbox other||
 +
<!-- Categories below this line, please; interwikis at Wikidata -->
 
[[Category:Golf infobox templates|Facility]]
 
[[Category:Golf infobox templates|Facility]]
<!-- ADD INTERWIKIS BELOW THIS LINE -->
+
[[Category:Infobox templates with module parameter|Golf facility]]
 
+
[[Category:Templates that add a tracking category]]
</includeonly>
+
}}</includeonly>

Latest revision as of 19:36, 25 April 2020

Usage

  1. redirect Template:Parameter names example
{{Infobox golf facility
| name                = <!-- name of the facility --> 
| image               = <!-- just name file name, no [[image:]] or size required -->
| imagesize           = <!-- include units -->
| caption             = 
| pushpin_map         = <!-- name of a location map (see Template:Location map) -->
| pushpin_relief      = <!-- any non-blank value to display relief map, if available -->
| pushpin_mapsize     = <!-- width of map (e.g., 220 without the px), default is 250 -->
| pushpin_map_alt     = <!-- alternative text for map, see WP:ALT for details -->
| pushpin_map_caption = <!-- text displayed below map, overrides default caption -->
| coordinates         = 
| location            = 
| establishment       = <!-- year -->
| type                = <!-- public/private -->
| owner               = <!-- name of organization/company -->
| operator            = <!-- name of organization/company -->
| holes               = <!-- total number of holes at club/resort -->
| tournaments         = <!-- notable tournaments held (if any) -->
| greens              = <!-- type of grass used -->
| fairways            = <!-- type of grass used -->
| website             = 
| course1             = <!-- individual course name, can leave blank if same as article title -->
| designer1           = 
| par1                =
| length1             = 
| rating1             = 
| slope1              =
| record1             = 
| module              = <!-- or 'embedded' or 'nrhp' -->
| image2              = <!-- a second image -->
| imagesize2          = 
| caption2            = 
}}

Additional courses

To add additional courses (up to 8 total) use

| course2            = <!-- if only one course: leave this entry and all below parts blank -->
| designer2          = 
| par2               = 
| length2            = 
| rating2            = 
| slope2             =
| record2            = 
| course3            = 
| designer3          = 
| par3               = 
| length3            = 
| rating3            = 
| slope3             =
| record3            = 
| course4            = 
| designer4          = 
| par4               = 
| length4            = 
| rating4            =
| slope4             = 
| record4            = 
| course5            = 
| designer5          = 
| par5               = 
| length5            = 
| rating5            = 
| slope5             =
| record5            = 
| course6            = 
| designer6          = 
| par6               = 
| length6            = 
| rating6            =
| slope6             = 
| record6            = 
| course7            = 
| designer7          = 
| par7               = 
| length7            = 
| rating7            = 
| slope7             =
| record7            = 
| course8            = 
| designer8          = 
| par8               = 
| length8            = 
| rating8            =
| slope8             = 
| record8            = 

Embedding other templates

The module=, embedded=, or nrhp= parameters can be used for embedding other templates into this infobox (see Wikipedia:Infobox modules):

{{Infobox golf facility
| name = 
...
| module = <!-- or 'embedded' or 'nrhp' -->
  {{Infobox ABC
  | embed = yes <!-- or 'child=yes' or 'subbox=yes' -->
  ...
  }}
}}

Coordinates

Template:UF-coord

Microformat

Template:UF-hcard-geo

Tracking category

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for Infobox golf facility

This is an infobox to describe individual golf courses.

Template parameters

ParameterDescriptionTypeStatus
Namename

The name of the facility

Default
default value
Stringoptional
Picture of courseimage

A representative picture of the facility; just add the filename of a picture.

Pageoptional
Picture Sizeimagesize

Provide the unit in the value; for instance, "98 pixels"

Stringoptional
Caption for picturecaption

no description

Stringoptional
Year course establishedestablishment

no description

Numberoptional
Type of coursetype

Typically only "Public" or "Private".

Stringoptional
Owner of courseowner

This is the owner of the golf course; if the owner has a wikipedia entry, markup with "[[" and "]]".

Stringoptional
Operator of courseoperator

This is the operator of the golf course; if the owner has a wikipedia entry, markup with "[[" and "]]".

Stringoptional
Holes countholes

Number of holes in the course (e.g. 18)

Numberoptional
Greensgreens

Type of grass used

Stringoptional
Fairwaysfairways

Type of grass used

Stringoptional
Tournaments held at coursetournaments

The tournaments listed should be notable, meaning they have wikipedia entries for them (markup with "[[" and "]]")

Stringoptional
Websitewebsite

If there is a website for the course, add it here.

Stringoptional

The following parameters have not been added to the templatedata yet:

  • pushpin_map =
  • pushpin_relief =
  • pushpin_mapsize =
  • pushpin_map_alt =
  • pushpin_map_caption =
  • coordinates =
  • location =
  • course1 =
  • designer1 =
  • par1 =
  • length1 =
  • rating1 =
  • slope1 =
  • record1 =
  • image2 =
  • imagesize2 =
  • caption2 =