Template:Guardian topic/sandbox
Template:PAGENAMEBASE collected news and commentary at The Guardian
![]() | This is the template sandbox page for Template:Guardian topic (diff). See also the companion subpage for test cases. |
Template:Uses Wikidata Template:Tracks Wikidata
![]() | This template uses Lua: |
![]() | This template is intended for external links. It is not designed for use as a citation template for reliable sources. |
This template generates an external link to a topic page at The Guardian website.
Contents
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
TemplateData for Guardian topic
This template generates an external link to a topic page at The Guardian website.
Parameter | Description | Type | Status | |
---|---|---|---|---|
ID | 1 | ID string used in the URL. | String | optional |
Name | 2 | Name displayed in the link text. If not specified it defaults to the article's {{PAGENAME}}, without disambiguation. | String | optional |
Tracking categories
- Category:Guardian topic ID not in Wikidata (0)
- Category:Guardian topic ID different from Wikidata (0)
- Category:Guardian topic ID same as Wikidata (0)
- Category:Guardian topic template with no id set (exists in template, not created)
See also
- {{NYT topic}} – topic page at The New York Times
- {{WSJ topic}} – topic page at The Wall Street Journal
- {{Bloomberg topic}} – topic page at Bloomberg News
- {{Aljazeera topic}} – topic page at Al Jazeera English
- {{WhoRunsGov}} – topic page at The Washington Post
The above documentation is transcluded from Template:Guardian topic/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. Please add categories to the /doc subpage. Subpages of this template. |