Wikivoyage listing wrapper templates
Location-based: Time-based:
{{Event}}

The {{Listing}} template is responsible for displaying information about individual local entities that travellers may interact with in a concise, uniform text format, and integrating it into other page elements that organize them using different formats (such as geographical points on a map). It is the generic "backend" used by the all of the type-specific wrapper templates linked above, which preprocess the data supplied for listings before passing them on to this template, silently fixing common mistakes and improving consistency with Wikivoyage standards and policies. (Such as Eat listings use of price range symbols instead of currency values and never having checkout times, and so much more.)

Usage

edit

It is strongly advised that all editors use the applicable wrapper template instead of this one whenever possible. Of course, unusual cases will always exist in which their implicit assumptions prevent a demonstrably superior end result and this template should be invoked explicitly. As always, use your best judgment and don't be afraid to ask for help on Template talk:Listing/doc if things go awry. This template may be fundamentally more versatile and fully-featured than its wrappers, this is achieved at the expense of usability and resilience, and a keen attention to detail is called for when used directly.

Parameters

edit

Supplementary information regarding this template parameters can be found in the § TemplateData section below.

Template:Listing parameters
Name Description
type One of: buy, do, drink, eat, go, see, sleep, city, vicinity or listing (default)
name Name used when dealing with the public, a/k/a trade name or dba (normally required)
alt Alternate names such as former names, vernacular nicknames or rendered in the native language
lat Latitude of primary physical location, in WGS84 format up to 5 decimal places (positive in Northern hemisphere)
long Longitude of primary physical location, in WGS84 format up to 5 decimal places (positive in Eastern hemisphere)
url Canonical URL of official, public website, including protocol (http[s]://)
email Email address from which responses can be reasonably expected from listing's representatives
address Street address of primary physical location, with city if necessary, but not postal code
directions Terse summary of how to successfully navigate the area and find the location, as sentence fragment
image Filename of image on Wikimedia Commons to display when map marker is clicked, without 'File:' namespace prefix
wikidata Wikidata identifier (QID or Q number) for item representing listing, if one exists
wikipedia Title of English Wikipedia page about location, if one exists
phone Telephone number for listing's representatives, formatted as described at WV:PN (+countrycode areacode number)
tollfree Toll-free or Freephone telephone number, formatted as described at WV:PN (unless unreachable from abroad)
fax Phone number to which facsimile (fax) document transmissions may be made using the ITU-T V.34 protocol, formatted as described at WV:PN
hours Publicly posted hours of operation
checkin Time of day at which new guests are able to occupy their accomodation (Sleep listings, only)
checkout Time of day by which departing guests must vacate their accomodation at the conclusion of their stay (Sleep listings only)
price Average financial cost of participation (range for attractions, one main course for restaurants or one night double occupancy for inns)
content Brief description and other useful contextual information
lastedit Date when the listing's factual information was last updated or verified, in RFC 3339 format yyyy-mm-dd (leave blank if sourcing information from an official website or secondary source)
counter Explicitly assign the map marker number of the listing irrespective of its position in the article relative to other listings; passed through to the {{Marker}} parameter of the same name
inline Alters the structure of the output for use within the text (prose) of an article rather than a self-contained block element when assigned a "truthy" Boolean value (most notably, by removing the terminal full stop/period (.)

There are no mandatory fields from a technical standpoint, but absent unusual circumstances, the |name= parameter should be treated as such, and both the |url= and |wikidata= parameters should also receive values if at all possible.

Blank template

edit

When adding new listings to pages using the source editor, you can use the provided Copy button in the upper-right corner to transfer this blank copy of the template to your device's clipboard to then paste into the edit box.

* {{Listing | type =
   | name     = | alt =
   | lat      = | long =
   | url      = | email =
   | address  = | directions =
   | image    = | wikidata = | wikipedia =
   | phone    = | tollfree = | fax =
   | hours    = | price = | checkin = | checkout =
   | content  =
   | lastedit =
}}

Caveats

edit
  • Unlike the old XML listing syntax, do not use quotation marks around your entries.
  • "lat" and "long" are for WGS84 coordinates' latitude and longitude, respectively (as measured and reported by most GPS receptors). Both are indicated in signed decimal form in degrees (using only an optional leading "+" or "-" sign, basic Latin digits, and "." as decimals separator), see example.
    Do not specify any hemisphere name of abbreviation, use an optional leading sign instead: the "-" sign is required in the southern and western hemispheres; negative longitudes are used in the eastern Pacific Ocean, all the Americas, most of the northern Atlantic Ocean including Iceland, Ireland, western UK and France, the Iberian peninsula and north-western Africa).
    Their value should be in the range from -90 to 90 inclusively for the latitude, and in the range from -180 to 180 for the longitude. The geographic poles conventionally use the arbitrary longitude 0.
    However, world maps rendered for the most commonly used 2D projections (Mercator-like, preserving angles and shapes but not relative surfaces) will not display positions at polar latitudes (below roughly -87.5 degrees, or above roughly 87.5 degrees). Some other maps may render all positions, using projections suitable for specific regions (with their own limits).

Notes

edit
  • This template also allows the insertion of an "edit" link near the end of the generated text. Clicking on it will open a custom form editor to fill in the existing or missing values for supported field values.
  • This "edit" link is added by a javascript extension tool (enabled on Wikivoyage), but it will not be visible in simple browsers (for old smartphones or some TV sets) that don't support Javascript, or in any browser whose Javascript has been disabled, or in any page which is not in the main namespace for articles (so it is also not visible in this template documentation page).
  • Though this template calls {{Marker}} to create a listing's header (item type, number, name, URL), that template's |zoom= and |group= parameters are not passed through to it, and this, are unsupported.
  • If |wikidata= is defined and the Wikidata item has an accurate value for the coordinate location property, it is unnecessary to explicitly supply values to the |lat= and |long= of this template, though please do confirm its accuracy first.

Example

edit
  • 1 Exploratorium, Pier 15, 698 The Embarcadero (at Green St), +1 415 528-4360. Tu-Su 10AM-5PM; open W until 10PM, closed M. A great kid friendly option, with lots of interactive exhibits teaching about science, with intriguing displays about the mind, natural systems, sound, sight, and much much more. Adults: $25, Students/seniors/youth: $19, Children age 5 and under: Free. Exploratorium (Q206518) on Wikidata Exploratorium on Wikipedia

Source:

* {{Listing
| name=Exploratorium | url=http://www.exploratorium.edu/ | email=
| address=Pier 15, 698 The Embarcadero | lat=37.8013 | long=-122.3988 | directions=at Green St
| phone=+1 415 528-4360 | tollfree= | fax=
| hours=Tu-Su 10AM-5PM; open W until 10PM, closed M
| price=Adults: $25, Students/seniors/youth: $19, Children age 5 and under: Free
| image=Giant Mirror at the Exploratorium.jpeg | wikipedia=Exploratorium | wikidata=Q206518
| lastedit=2015-01-15
| content=A great kid friendly option, with lots of interactive exhibits teaching about science, with intriguing displays about the mind, natural systems, sound, sight, and much much more.
}}

TemplateData

edit

This is the TemplateData for Template:Listing/doc, for use by TemplateWizard, VisualEditor and other tools.

Template description

This template is used for implementing business listings.

Template parameters

This template has custom formatting.

ParameterDescriptionTypeStatus
Typetype

Adds listing to one of several established presentation groups

Suggested values
listing see do buy eat drink sleep go city vicinity
Default
listing
Example
see
Linesuggested
Namename

Name used by entity to identify itself to the public, also known as a 'trade name', 'operating name' or 'dba'

Example
Natolin metro station
Linerequired
Latitudelat

The latitude of the listing's primary physical location in decimal notation (WGS84 style) with max. 5 places, or set to 'NA' to bypass fetching the value from Wikidata

Suggested values
NA
Example
52.23167
Numbersuggested
Longitudelong

The longitude of the listing's primary physical location using decimal notation (WGS84 style) with max. 5 places, or set to 'NA' to bypass fetching the value from Wikidata

Suggested values
NA
Example
21.00639
Numbersuggested
Commons imageimage

Name of file on Wikimedia Commons to show when the listing is clicked on dynamic maps, otherwise it will be acquired from Wikidata if possible; do not include the 'File:' namespace prefix

Example
Giant Mirror at the Exploratorium.jpeg
Fileoptional
Websiteurl

URL of the listing's official public website, including the protocol ('http://' or 'https://')

Example
https://um.warszawa.pl/
URLsuggested
Wikidata itemwikidata

Wikidata identifier (QID or 'Q number') for item representing the listing

Example
Q639010
Linesuggested
Alternative namealt

Other name(s) the listing may be known to the public as (if any), such as former names or local nicknames

Example
Kercelak
Lineoptional
Street addressaddress

Street address of the listing's primary physical location, typically without city and never including the postal code

Example
c/Ochoa 23
Linesuggested
Driving directionsdirections

A terse description of how to find the location, if warranted, formatted as a sentence fragment (sans initial capital and terminating punctuation)

Example
Main gate at Mean Street
Lineoptional
Phone numberphone

Listing's primary telephone number, formatted as described in [[WV:PN]]

Example
+48 22 987-65-43
Linesuggested
Toll-free numbertollfree

Toll-free phone number for contacting the listing, if available

Example
+1 800 468-5865
Lineoptional
Fax numberfax

Contact number where the listing accepts facsimile (fax) document transmissions using the ITU-T V.34 protocol

Example
+48 22 765-43-21
Lineoptional
Emailemail

Email address of the listing

Stringsuggested
Operating hourshours

Operating hours of listing

Example
Tu-Su 10AM-5PM; open W until 10PM, closed M
Stringsuggested
Check-in timecheckin

Time of day when sleep listing begins allowing new guests into their accomodation

Example
11AM
Lineoptional
Check-out timecheckout

Time of day when sleep listing requires departing guests to relinquish their accomodation to avoid further charges

Example
Noon
Lineoptional
Descriptioncontent 1

Brief description of the listing

Example
A great kid friendly option, with lots of interactive exhibits teaching about science, with intriguing displays about the mind, natural systems, sound, sight, and much much more.
Contentsuggested
Priceprice

Admission price

Example
Adults: $25, Students/seniors/youth: $19, Children age 5 and under: Free
Stringsuggested
Wikipedia articlewikipedia

Name of an English Wikipedia article about the listing; acquired from Wikidata (if present)

Example
Natolin metro station
Page nameoptional
Last editedlastedit

Date when the listing's factual information was last updated or verified, in RFC 3339 format (yyyy-mm-dd)

Example
2024-10-28
Auto value
{{subst:#time:Y-m-d}}
Datesuggested
Marker numbercounter

Assigns a particular marker number, overriding the default based on listing type + article placement

Default
listing
Example
6
Numberoptional
Inlineinline

When assigned any value, modifies listing for display as part of a sentence or other prosaic context, suspending the use of full stops (periods) as data element separators

Suggested values
true on yes y 1
Example
on
Lineoptional

Microformat

edit

See also

edit