Difference between revisions of "Template:Guardian topic/doc"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
m (module note)
imported>JJMC89
(not a wrapper now)
 
Line 3: Line 3:
 
{{Uses Wikidata|P3106}}
 
{{Uses Wikidata|P3106}}
 
{{Tracks Wikidata|P3106}}
 
{{Tracks Wikidata|P3106}}
{{cs1 wrapper|base=Cite web}}
 
 
{{Lua|Module:EditAtWikidata|Module:WikidataCheck}}
 
{{Lua|Module:EditAtWikidata|Module:WikidataCheck}}
 
{{info|1=This template is intended for [[Wikipedia:External links|external links]].  It is not designed for use as a [[Wikipedia:Citation templates|citation template]] for reliable sources.}}
 
{{info|1=This template is intended for [[Wikipedia:External links|external links]].  It is not designed for use as a [[Wikipedia:Citation templates|citation template]] for reliable sources.}}
Line 10: Line 9:
  
 
== Usage ==
 
== Usage ==
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' }}</code>
+
: {{tlc|{{BASEPAGENAME}} | ''ID'' }}
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' | ''NAME'' }}</code>
+
: {{tlc|{{BASEPAGENAME}} | ''ID'' | ''NAME'' }}
  
 
== Instructions ==
 
== Instructions ==
Line 67: Line 66:
 
* {{tl|WhoRunsGov}} &ndash; topic page at ''[[The Washington Post]]''
 
* {{tl|WhoRunsGov}} &ndash; topic page at ''[[The Washington Post]]''
  
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
+
<includeonly>{{sandbox other||
 
<!-- Categories below this line, please; interwikis at Wikidata -->
 
<!-- Categories below this line, please; interwikis at Wikidata -->
 
[[Category:External link templates]]
 
[[Category:External link templates]]

Latest revision as of 08:42, 14 February 2020

Template:Uses Wikidata Template:Tracks Wikidata

This template generates an external link to a topic page at The Guardian website.

Usage

{{Guardian topic| ID}}
{{Guardian topic| ID| NAME}}

Instructions

Provide the URL path (after the first level) as the first parameter, and an optional name as the second parameter. If no ID is provided, the template will attempt to fetch the value from Wikidata. If no name is provided for the second parameter, the template will use the name of the Wikipedia article.

Examples

One parameter

URL: http://www.theguardian.com/music/aretha-franklin

Usage: {{Guardian topic | music/aretha-franklin }}

Output: Template:PAGENAMEBASE collected news and commentary at The GuardianScript error: No such module "EditAtWikidata".Template:WikidataCheck

Two parameters

URL: http://www.theguardian.com/technology/billgates

Usage: {{Guardian topic | technology/billgates | Bill Gates }}

Output: Bill Gates collected news and commentary at The GuardianScript error: No such module "EditAtWikidata".Template:WikidataCheck

Template data

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for Guardian topic

This template generates an external link to a topic page at The Guardian website.

Template parameters

ParameterDescriptionTypeStatus
ID1

ID string used in the URL.

Stringoptional
Name2

Name displayed in the link text. If not specified it defaults to the article's {{PAGENAME}}, without disambiguation.

Stringoptional

Tracking categories

See also