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

From blackwiki
Jump to navigation Jump to search
imported>WOSlinker
(tidy docs for coordinates)
imported>WOSlinker
(→‎Map and coordinates: remove old note)
Line 224: Line 224:
 
*To display coordinates at the top of the page, set <code>coordinates_display=</code> to any non-blank value.  Otherwise coordinates will appear in the infobox only.
 
*To display coordinates at the top of the page, set <code>coordinates_display=</code> to any non-blank value.  Otherwise coordinates will appear in the infobox only.
 
*The [[ISO 3166-1 alpha-2]] or [[ISO 3166-2]] region code is set using the <code>iso_region=</code> parameter.
 
*The [[ISO 3166-1 alpha-2]] or [[ISO 3166-2]] region code is set using the <code>iso_region=</code> parameter.
 
One advantage of omitting the <code>coordinates=</code> parameter is that you can display a {{tl|Location map}} without duplicating coordinates.
 
  
 
:Parameters to specify [[Geographic coordinate system|coordinates]] in [[Degree (angle)|degrees]], [[Minute of arc|minutes]], and seconds of arc:
 
:Parameters to specify [[Geographic coordinate system|coordinates]] in [[Degree (angle)|degrees]], [[Minute of arc|minutes]], and seconds of arc:

Revision as of 21:03, 8 March 2017

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' -->
  ...
  }}
}}

Map and coordinates

It's usually not necessary to use the coordinates= parameter.

  • The latitude and longitude of the course may be specified:
    • in decimal degrees, using latitude= and longitude= OR
    • in degrees/minutes/seconds, using latd=, latm=, lats=, latNS=, longd=, longm=, longs=, and longEW=.
  • To display coordinates at the top of the page, set coordinates_display= to any non-blank value. Otherwise coordinates will appear in the infobox only.
  • The ISO 3166-1 alpha-2 or ISO 3166-2 region code is set using the iso_region= parameter.
Parameters to specify coordinates in degrees, minutes, and seconds of arc:
{{Infobox golf facility
...
| latd   = <!-- ''latitude'' degrees -->
| latm   = <!-- ''latitude'' minutes -->
| lats   = <!-- ''latitude'' seconds -->
| latNS  = <!-- latitude: S=south, N=north (default) -->
| longd  = <!-- ''longitude'' degrees -->
| longm  = <!-- ''longitude'' minutes -->
| longs  = <!-- ''longitude'' seconds -->
| longEW = <!-- longitude: W=west, E=east (default) -->
...
}}
Parameters to specify coordinates in decimal degrees:
{{Infobox golf facility
...
| latitude  = <!-- ''latitude'' (decimal format; enter negative numbers for southern latitude) -->
| longitude = <!-- ''longitude'' (decimal format; enter negative numbers for western longitude) --> 
...
}}

Note: coordinates in decimal degrees are sensitive to extra whitespace in the parameters:

  • Incorrect: | longitude = - 123.45
  • Correct: | longitude = -123.45

Coordinates

Template:UF-coord

Microformat

Template:UF-hcard-geo

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 =