Difference between revisions of "Template:BBC programme/doc"
imported>Galobtter (→Usage: update) |
imported>Zyxw (update usage, examples, category links, and TemplateData) |
||
| Line 5: | Line 5: | ||
{{Lua|Module:EditAtWikidata|Module:WikidataCheck}} | {{Lua|Module:EditAtWikidata|Module:WikidataCheck}} | ||
| − | + | This template displays an external link to the [[BBC Online#iPlayer and programme sites|BBC Programmes]] page at [[BBC Online]] for a [[BBC]] television or radio programme. It is intended for use in the [[Wikipedia:External links|external links]] section of an article. | |
| − | This template | ||
| − | + | == Usage == | |
| + | ; Unnamed parameters | ||
| + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' }}</code> | ||
| + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' | ''TITLE'' }}</code> | ||
| + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' | ''TITLE'' | ''DESCRIPTION'' }}</code> | ||
| − | + | ; Named parameters | |
| − | + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' }}</code> | |
| + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | title= ''TITLE'' }}</code> | ||
| + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | title= ''TITLE'' | description= ''DESCRIPTION'' }}</code> | ||
| + | |||
| + | ; Using [[Wikidata]] property {{Property|827}} | ||
| + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}}}}</code> | ||
| + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | title= ''TITLE'' }}</code> | ||
| + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | title= ''TITLE'' | description= ''DESCRIPTION'' }}</code></code> | ||
The template has the following optional parameters: | The template has the following optional parameters: | ||
| Line 29: | Line 39: | ||
|} | |} | ||
| − | == | + | == Examples == |
| − | + | ; One parameter | |
| − | < | + | : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | b006m86d }}</code> |
| + | :* {{{{BASEPAGENAME}} | b006m86d }} | ||
| + | : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} |id= b006m86d }}</code> | ||
| + | :* {{{{BASEPAGENAME}} | id= b006m86d }} | ||
| + | |||
| + | ; Two parameters | ||
| + | : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | b006m86d | EastEnders }}</code> | ||
| + | :* {{{{BASEPAGENAME}} | b006m86d | EastEnders }} | ||
| + | : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | id= b006m86d | title= EastEnders }}</code> | ||
| + | :* {{{{BASEPAGENAME}} | id= b006m86d | title= EastEnders }} | ||
| + | |||
| + | ; Three parameters | ||
| + | : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | b006m86d | EastEnders | (British TV series) }}</code> | ||
| + | :* {{{{BASEPAGENAME}} | b006m86d | EastEnders | (British TV series) }} | ||
| + | : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | id= b006m86d | title= EastEnders | description= (British TV series) }}</code> | ||
| + | :* {{{{BASEPAGENAME}} | id= b006m86d | title= EastEnders | description= (British TV series) }} | ||
| − | + | ; No ID in template or Wikidata | |
| − | * {{ | + | : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}}}}</code> |
| + | :* {{{{BASEPAGENAME}}<!-- -->}} | ||
==Tracking categories== | ==Tracking categories== | ||
| + | ; ID parameter exists | ||
* {{clc|BBC programme ID not in Wikidata}} | * {{clc|BBC programme ID not in Wikidata}} | ||
* {{clc|BBC programme ID different from Wikidata}} | * {{clc|BBC programme ID different from Wikidata}} | ||
* {{clc|BBC programme ID same as Wikidata}} | * {{clc|BBC programme ID same as Wikidata}} | ||
| − | * {{ | + | ; ID parameter does not exist |
| + | * {{clc|BBC programme template missing ID and not in Wikidata}} | ||
| + | * {{clc|BBC programme template using Wikidata}} | ||
==See also== | ==See also== | ||
| Line 47: | Line 76: | ||
* {{tl|BBC composer page}} - for links to pages about composers | * {{tl|BBC composer page}} - for links to pages about composers | ||
| − | == | + | ==TemplateData== |
{{TemplateData header}} | {{TemplateData header}} | ||
<templatedata> | <templatedata> | ||
{ | { | ||
| + | "description": "This template displays an external link to the BBC Programmes page at BBC Online for a BBC television or radio programme. It is intended for use in the external links section of an article.", | ||
| + | "format": "inline", | ||
"params": { | "params": { | ||
"id": { | "id": { | ||
| − | "label": "Programme ID", | + | "label": "Programme identifier", |
| + | "aliases": [ "1" ], | ||
| + | "description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the identifier (ID) portion of the URL. Example: b006m86d is the ID portion of https://www.bbc.co.uk/programmes/b006m86d. This parameter is optional if Wikidata property P827 exists, but required if not.", | ||
"type": "string", | "type": "string", | ||
| + | "required": false, | ||
| + | "default": "Wikidata property P827", | ||
"example": "b006m86d" | "example": "b006m86d" | ||
}, | }, | ||
"title": { | "title": { | ||
| − | "label": "Programme name", | + | "label": "Programme title", |
| + | "aliases": ["2"], | ||
| + | "description": "The \"title\" parameter (or unnamed parameter \"2\") may be used to specify the title of the programme. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as \"(TV series)\". It is displayed in an italic font.", | ||
"type": "string", | "type": "string", | ||
| + | "required": false, | ||
| + | "default": "{{PAGENAMEBASE}}", | ||
"example": "EastEnders" | "example": "EastEnders" | ||
}, | }, | ||
"description": { | "description": { | ||
| − | "label": " | + | "label": "Programme description", |
| − | "type": "string" | + | "aliases" : [ "3" ], |
| + | "description": "The \"description\" parameter (or unnamed parameter \"3\") may be used to add a description of the programme. It is displayed in a non-italic font.", | ||
| + | "type": "string", | ||
| + | "required": false | ||
} | } | ||
}, | }, | ||
| − | " | + | "paramOrder": [ |
| − | + | "id", | |
| + | "title", | ||
| + | "description" | ||
| + | ] | ||
} | } | ||
</templatedata> | </templatedata> | ||
Revision as of 21:42, 25 April 2019
| This is a documentation subpage for Template:BBC programme. It contains usage information, categories and other content that is not part of the original template page. |
Template:Uses Wikidata Template:Tracks Wikidata
| This template uses Lua: |
This template displays an external link to the BBC Programmes page at BBC Online for a BBC television or radio programme. It is intended for use in the external links section of an article.
Usage
- Unnamed parameters
{{BBC programme | ID }}{{BBC programme | ID | TITLE }}{{BBC programme | ID | TITLE | DESCRIPTION }}
- Named parameters
{{BBC programme | id= ID }}{{BBC programme | id= ID | title= TITLE }}{{BBC programme | id= ID | title= TITLE | description= DESCRIPTION }}
- Using Wikidata property Template:Property
{{BBC programme}}{{BBC programme | title= TITLE }}{{BBC programme | title= TITLE | description= DESCRIPTION }}
The template has the following optional parameters:
| Parameter | Notes |
|---|---|
| id | Programme id given after https://www.bbc.co.uk/programmes/. For example, the EastEnders entry is at https://www.bbc.co.uk/programmes/b006m86d and the id is b006m86d. |
| title | Programme name, for the above example this would be EastEnders. The title is automatically formatted. |
| description | Additional description |
Examples
- One parameter
* {{BBC programme | b006m86d }}- Template:PAGENAMEBASE at BBC ProgrammesScript error: No such module "EditAtWikidata".Template:WikidataCheck
* {{BBC programme |id= b006m86d }}- Template:PAGENAMEBASE at BBC ProgrammesScript error: No such module "EditAtWikidata".Template:WikidataCheck
- Two parameters
* {{BBC programme | b006m86d | EastEnders }}- EastEnders at BBC ProgrammesScript error: No such module "EditAtWikidata".Template:WikidataCheck
* {{BBC programme | id= b006m86d | title= EastEnders }}- EastEnders at BBC ProgrammesScript error: No such module "EditAtWikidata".Template:WikidataCheck
- Three parameters
* {{BBC programme | b006m86d | EastEnders | (British TV series) }}- EastEnders (British TV series) at BBC ProgrammesScript error: No such module "EditAtWikidata".Template:WikidataCheck
* {{BBC programme | id= b006m86d | title= EastEnders | description= (British TV series) }}- EastEnders (British TV series) at BBC ProgrammesScript error: No such module "EditAtWikidata".Template:WikidataCheck
- No ID in template or Wikidata
* {{BBC programme}}- Template:PAGENAMEBASE at BBC ProgrammesScript error: No such module "EditAtWikidata".Template:WikidataCheck
Tracking categories
- ID parameter exists
- Category:BBC programme ID not in Wikidata (0)
- Category:BBC programme ID different from Wikidata (0)
- Category:BBC programme ID same as Wikidata (0)
- ID parameter does not exist
- Category:BBC programme template missing ID and not in Wikidata (0)
- Category:BBC programme template using Wikidata (0)
See also
- {{BBC Online}} – for general links to BBC Online pages
- {{BBC episode}} – for links to BBC Programmes episode pages
- {{BBC composer page}} - for links to pages about composers
TemplateData
TemplateData for BBC programme
This template displays an external link to the BBC Programmes page at BBC Online for a BBC television or radio programme. It is intended for use in the external links section of an article.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Programme identifier | id 1 | The "id" parameter (or unnamed parameter "1") should contain the identifier (ID) portion of the URL. Example: b006m86d is the ID portion of https://www.bbc.co.uk/programmes/b006m86d. This parameter is optional if Wikidata property P827 exists, but required if not.
| String | optional |
| Programme title | title 2 | The "title" parameter (or unnamed parameter "2") may be used to specify the title of the programme. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as "(TV series)". It is displayed in an italic font.
| String | optional |
| Programme description | description 3 | The "description" parameter (or unnamed parameter "3") may be used to add a description of the programme. It is displayed in a non-italic font. | String | optional |