Difference between revisions of "Template:C-SPAN/doc"

From blackwiki
Jump to navigation Jump to search
imported>Adavidb
m (added a note regarding the C-SPAN id)
imported>Vanisaac
m (→‎See also: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
 
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
 
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
 +
{{Uses Wikidata|P2190}}
  
 
This template allows linking to the C-SPAN link appropriate for many biographies. This will aid in the maintenance and standardization of these external links.
 
This template allows linking to the C-SPAN link appropriate for many biographies. This will aid in the maintenance and standardization of these external links.
Line 13: Line 14:
  
 
===Fields===
 
===Fields===
The only field is the C-SPAN identifier.
+
The only field is the C-SPAN identifier. If it is not provided, then the first value from Wikidata will be used. If the Wikidata item does not have any {{Q|P2190}} data, or there is no Wikidata item for the article, then the article title will be used to generate a link.
  
 
{| class="wikitable"
 
{| class="wikitable"
 
! Field !! Data !! Result !! [[URL]] source
 
! Field !! Data !! Result !! [[URL]] source
 
|-
 
|-
| 1 || C-SPAN id || Appearances on || <nowiki>https://</nowiki>www.c-spanvideo.org/'''{{{1}}}'''
+
| 1 || C-SPAN id || Appearances on || https://<nowiki/>www.c-span.org/person/?'''{{{1}}}'''
 
|-
 
|-
 
|}
 
|}
Line 24: Line 25:
 
==Example==
 
==Example==
 
URL:
 
URL:
: <code><nowiki>https://</nowiki>www.c-spanvideo.org/{{hilite|jonstewart}}</code>
+
: <kbd>https://<nowiki/>www.c-spanvideo.org/{{hilite|jonstewart}}</kbd> (former URL)
 +
: <kbd>https://<nowiki/>www.c-span.org/person/?{{hilite|jonstewart}}</kbd> (current URL)
  
 
Usage:
 
Usage:
Line 38: Line 40:
 
* {{tl|Worldcat id}}
 
* {{tl|Worldcat id}}
  
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
+
<includeonly>{{Sandbox other||
 
<!-- Categories below this line, please; interwikis at Wikidata -->
 
<!-- Categories below this line, please; interwikis at Wikidata -->
 
[[Category:Television external link templates|C-SPAN]]
 
[[Category:Television external link templates|C-SPAN]]
 
[[Category:People and person external link templates|C-SPAN]]
 
[[Category:People and person external link templates|C-SPAN]]
 
}}</includeonly>
 
}}</includeonly>

Latest revision as of 00:41, 24 April 2020

Template:Uses Wikidata

This template allows linking to the C-SPAN link appropriate for many biographies. This will aid in the maintenance and standardization of these external links.

Usage

Cut & paste

{{C-SPAN|}}

Fields

The only field is the C-SPAN identifier. If it is not provided, then the first value from Wikidata will be used. If the Wikidata item does not have any Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P2190) data, or there is no Wikidata item for the article, then the article title will be used to generate a link.

Field Data Result URL source
1 C-SPAN id Appearances on https://www.c-span.org/person/?{{{1}}}

Example

URL:

https://www.c-spanvideo.org/jonstewart (former URL)
https://www.c-span.org/person/?jonstewart (current URL)

Usage:

{{C-SPAN | jonstewart }}

Result:

Appearances on C-SPAN

Note:

C-SPAN's naming convention varies, and while a concatenation of first name with last name appears to be most common, a middle name, middle initial, or alternate name may be a component of the id used for C-SPAN appearances. Also, not all political figures have appeared on C-SPAN.

See also