Difference between revisions of "Template:CycleBase"
imported>Zyxw (Trim any leading spaces from unnamed parameter 1 that would break URL. Allow named parameters. Add documentation.) |
imported>Zyxw (When ID not specified, use Wikidata property P4508 if available and add edit link. Display message if no ID and no Wikidata. Add fix for empty name parameter. Update URL.) |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
| − | [http://www.cyclebase.nl/?lang=en | + | {{#if: {{{1<includeonly>|</includeonly>}}} {{{id|}}} {{#property:P4508}} |
| + | |||
| + | | [http://www.cyclebase.nl/?lang=en&page=renner&id={{#if: {{{1|{{{id<includeonly>|</includeonly>}}}}}} | {{{1|{{{id}}}}}} | {{First word|1={{#property:P4508}}|sep=,}} }} {{#if: {{{2|{{{name<includeonly>|</includeonly>}}}}}} | {{{2|{{{name}}}}}} | {{PAGENAMEBASE}} }}] at ''CycleBase.nl''<includeonly>{{EditAtWikidata|pid=P4508|{{{1|{{{id|}}}}}}}}</includeonly> | ||
| + | |||
| + | | <span class="error">{{[[Template:CycleBase|CycleBase]]}} template missing ID and not present in Wikidata.</span> | ||
| + | |||
| + | }}<noinclude> | ||
{{Documentation}}<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> | {{Documentation}}<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> | ||
</noinclude> | </noinclude> | ||
Latest revision as of 19:15, 21 November 2018
{{{name}}} at CycleBase.nl
Template:Uses Wikidata Lua error in Module:Lua_banner at line 113: attempt to index field 'edit' (a nil value).
Template:CycleBase displays an external link to a cyclist's page at the CycleBase.nl website. It is intended for use in the external links section of an article.
Contents
Usage
- Unnamed parameters
{{CycleBase | ID }}{{CycleBase | ID | NAME }}
- Named parameters
{{CycleBase | id= ID }}{{CycleBase | id= ID | name= NAME }}
- Using Wikidata property Template:Property
{{CycleBase}}{{CycleBase | name= NAME }}
Examples
Unnamed parameters
- URLs
- http://www.cyclebase.nl/?lang=en&page=renner&id=35840
- http://www.cyclebase.nl/?lang=en&news=en&pc=normal&page=renner&id=35840
- http://www.cyclebase.nl/index.php?uid=0&sid=0&lang=nl&news=nl&pc=normal&page=renner&db=m&id=35840
- Usage
* {{CycleBase | 35840 | Anna van der Breggen }}
- Output
-
- Anna van der Breggen at CycleBase.nlScript error: No such module "EditAtWikidata".
Named parameters
- URLs
- http://www.cyclebase.nl/?lang=en&page=renner&id=16289
- http://www.cyclebase.nl/?lang=en&news=en&pc=normal&page=renner&id=16289
- http://www.cyclebase.nl/index.php?uid=0&sid=0&lang=nl&news=nl&pc=normal&page=renner&db=m&id=16289
- Usage
* {{CycleBase |id= 16289 |name= Alejandro Valverde Belmonte }}
- Output
-
- Alejandro Valverde Belmonte at CycleBase.nlScript error: No such module "EditAtWikidata".
No parameters and Wikidata property not defined
- Usage
* {{CycleBase}}
- Output
-
- Template:PAGENAMEBASE at CycleBase.nlScript error: No such module "EditAtWikidata".
TemplateData
TemplateData for CycleBase
This template displays an external link to a cyclist's page at the CycleBase.nl website. It is intended for use in the external links section of an article.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| id | id 1 | The "id" parameter (or unnamed parameter "1") should contain the ID portion of the URL. Example: 35840 is the ID portion of http://www.cyclebase.nl/?lang=en&page=renner&id=35840 or http://www.cyclebase.nl/?lang=en&news=en&pc=normal&page=renner&id=35840. This parameter is optional if Wikidata property 4508 exists, but required if not.
| Number | optional |
| name | name 2 | The "name" parameter (or unnamed parameter "2") may be used to specify the link text, which should be the name of the cyclist. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as "(cyclist)".
| String | optional |
See also
| The above documentation is transcluded from Template:CycleBase/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |