Zum Inhalt springen

Wikivoyage:VCard/How to…

Aus Wikivoyage

This article is intended to provide solutions to various problems. It includes FAQs, too.

Dependencies

[Bearbeiten]

Module:vCard is not using Module:Marker, ie both modules have no direct dependencies. Both modules use the common library Module:Marker utilities. This means Module:Marker has not to be installed to use Module:vCard.

Parameter names

[Bearbeiten]

Parameter names are case-sensitive.

Usage of aliases

[Bearbeiten]

For each parameter of {{Marker}} and {{vCard}} templates alias-parameter names can be defined in Module:Marker/Params and Module:VCard/i18n, respectively. Furthermore, aliases can be given to groups, types and subtypes.

Difference between vCard/i18n and vCard/Params

[Bearbeiten]
[Bearbeiten]

It is possible to use the Mediawiki link syntax to link the name with an article or article section. Text outside the link syntax will be removed.

  • name = [[an article link|name]] — link to an article
  • name = [[an article link#with anchor|name]] — link to an anchor/section within an article.
  • name = [[#an anchor|name]] — link to an anchor/section within the current article.

If |wikidata= is specified article links would be retrieved from Wikidata if available. Mediawiki link syntax prevents the use of Wikidata sitelinks.

Beside article links, weblinks can be used, too.

  • url = https://...

If no article link is used, the weblink is used to link the name of the organization or location. If both links are simultaneously used then (1) the article link is used for the name and (2) a globe icon is added behind the name with the url link.

In case of social media links please do not use |url= but the related social-media parameters like |facebook= instead.

(Intended) sitelink redirects as defined in Wikidata are usually not used for linking names of locations of organizations. But articles where these links are detected are collected in unused sitelink redirects category. To use such a sitelink redirect you should set show = wikilink. Articles in which this show options are used are collected in the article link is redirect category.

Anchor ids

[Bearbeiten]
  • id = vCard_…
    • Wikidata-Id in Wrapper-Tag
    • Name-Id in listing-name-bdi-Tag

Copy markers

[Bearbeiten]

Booking services

[Bearbeiten]

Booking services like Agoda.com, Booking.com are supported in {{vCard}} but not shown in output. There are no vCard template parameters which could be manually entered. These values are only fetched from Wikidata and only stored as data-… attributes in the wrapper tag. These attributes can be used by gadgets or user scripts.

[Bearbeiten]

In case of {{Marker}}s, social-media links are not shown by default. There are no parameters like |facebook=, too. The link values can solely retrieved from Wikidata if show = socialmedia is set as a template parameter. To completely prevent the use of social media links, you should comment the line socialmedia = 1 in Module:Marker/Params, too.

In case of {{vCard}}s, social-media links are shown by default. But it is possible to prevent their display by using show = nosocialmedia in the template. To do this for the whole wiki you should set options.defaultShow = 'poi, nosocialmedia' in Module:Marker_utilities/i18n. In latter case it makes sense to comment all social-media parameters in Module:VCard/i18n to enforce the output of error messages if social-media links are specified.

Deprecated parameters

[Bearbeiten]

|wikipedia= is deprecated in {{vCard}} because all Wikipedia article sitelinks are given in Wikidata. Use |wikidata= to define the Wikidata Id. Nevertheless, |wikipedia= is supported. To use it please remove the comment in Module:VCard/i18n.

|commonscat= should be avoided because in most cases the Commons category is part of the related Wikidata data set. If it is missing check if it could be added.

Time consumption

[Bearbeiten]

… if WD; maplink No difference if one or hundreds of data are used because the whole data set is cached while the parsing of Mediawiki syntax.