Difference between revisions of "Template:BBC programme"
imported>Zyxw (Update handling of missing ID (previous placement of category prevented it from being included). If Wikidata property has multiple values, only use first one. Fix for empty title parameter. Use italics for title only, not for description.) |
imported>Zyxw m (formatting) |
||
| Line 1: | Line 1: | ||
{{#if: {{{1<includeonly>|</includeonly>}}} {{{id|}}} {{#property:P827}} | {{#if: {{{1<includeonly>|</includeonly>}}} {{{id|}}} {{#property:P827}} | ||
| − | | [https://www.bbc.co.uk/programmes/{{#if: {{{1|{{{id<includeonly>|</includeonly>}}}}}} | {{{1|{{{id}}}}}} | {{First word|1={{#property:P827}}|sep=,}} }} | + | | [https://www.bbc.co.uk/programmes/{{#if: {{{1|{{{id<includeonly>|</includeonly>}}}}}} | {{{1|{{{id}}}}}} | {{First word|1={{#property:P827}}|sep=,}} }} ''{{#if: {{{2|{{{title<includeonly>|</includeonly>}}}}}} | {{{2|{{{title}}}}}} | {{PAGENAMEBASE}} }}''{{#if: {{{3|{{{description|}}}}}} |  {{{3|{{{description}}}}}} }}] at [[BBC Online#iPlayer and Programmes sites|BBC Programmes]]<includeonly>{{EditAtWikidata|pid=P827|{{{1|{{{id|}}}}}}}}</includeonly>{{WikidataCheck|property=P827|value={{{1|{{{id|}}}}}}|category=BBC programme ID|namespaces=0}}{{#ifeq:{{NAMESPACENUMBER}}|0|{{#if:{{{1|{{{id|}}}}}}||[[Category:BBC programme template using Wikidata]]}}}} |
| <span class="error">{{[[Template:BBC programme|BBC programme]]}} template missing ID and not present in Wikidata.</span>{{#ifeq:{{NAMESPACENUMBER}}|0|[[Category:BBC programme template missing ID and not in Wikidata]]}} | | <span class="error">{{[[Template:BBC programme|BBC programme]]}} template missing ID and not present in Wikidata.</span>{{#ifeq:{{NAMESPACENUMBER}}|0|[[Category:BBC programme template missing ID and not in Wikidata]]}} | ||
Revision as of 23:09, 25 April 2019
{{{title}}} at BBC ProgrammesTemplate:WikidataCheck
| This template is used on approximately 2,400 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.
Transclusion count updated automatically (see documentation). |
Template:Uses Wikidata Template:Tracks Wikidata Lua error in Module:Lua_banner at line 113: attempt to index field 'edit' (a nil value).
This template displays an external link to the BBC Programmes page at BBC Online for a BBC television or radio programme.
There are some specific rules about it's usage.
- It is not a general BBC linking template. Use a normal external URL link, not this template.
- It can only be used on the main article about the subject, not related articles like "List of" articles, character articles etc.
- It should only be used in the external links section of an article and should not be used inside a reference.
- It can only be used once per article.
- For individual episodes use {{BBC episode}} instead.
All other uses (or multiple uses in the same article) will result in conflicts between Wikipedia and Wikidata, causing the article to appear in the error categories below.
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
- No parameters and the show has a Wikidata entry with a BBC programme id.
* {{BBC programme}}- EastEnders at BBC ProgrammesScript error: No such module "EditAtWikidata".Template:WikidataCheck
- No parameters and the show does not have a Wikidata entry with a BBC programme id.
* {{BBC programme}}- Template:PAGENAMEBASE at BBC ProgrammesScript error: No such module "EditAtWikidata".Template:WikidataCheck
- 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
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 |
| The above documentation is transcluded from Template:BBC programme/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. |