Jump to content

Module:Sports reference/doc: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
{{Uses Wikidata}}
update
Line 1: Line 1:
{{module rating|release}}
{{module rating|release}}
{{Uses Wikidata|P1447}}
{{Uses Wikidata|P1447}}
{{Uses Wikidata|P1447}}
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->


== Usage ==
== Usage ==
This module returns a link to [[Sports Reference|Sports-Reference.com]]. The URL is taken from Wikidata, ''unless'' there is no link on Wikidata. If that's the case, the module uses the link from the ''optional backup parameter''; if there is no link on Wikidata and no backup parameter, it will return an error message explaining how to fix the issue.
This module returns a link to [[Sports Reference|Sports-Reference.com]]. The module only has one function, <code>link</code>, which returns the external link text ready for use.
&#123;{#invoke:SportsReference|link|''id (optional)''|''name (optional)''}}


The module only has one function, <code>link</code>, which returns the external link text ready for use. It should be used in the {{tl|Sports-reference}} template thusly:
For complete usage and examples, see the {{tl|Sports-reference}} template:

&#123;{#invoke:SportsReference|link|''optional backup parameter''}}

The reason the module prefers links from Wikidata rather than the links given in the backup parameter is that it is much simpler to correct the links in Wikidata, and that will benefit all projects and not just this wiki; also, Wikidata supports various constraints so that the items and values can [[d:Wikidata:Database reports/Constraint violations/P1447|easily be checked]] for errors.


<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||

Revision as of 10:55, 21 May 2018

Usage

This module returns a link to Sports-Reference.com. The module only has one function, link, which returns the external link text ready for use.

{{#invoke:SportsReference|link|id (optional)|name (optional)}}

For complete usage and examples, see the {{Sports-reference}} template: