Template:Guardian topic/doc

Template:Guardian topic generates an external link to a topic page at The Guardian website. It is intended for use in the external links section of an article.

Usage

Unnamed parameters
{{Guardian topic | ID }}
{{Guardian topic | ID | NAME }}
Named parameters
{{Guardian topic | id= ID }}
{{Guardian topic | id= ID | name= NAME }}
Using Wikidata property The Guardian topic ID (P3106)
{{Guardian topic}}
{{Guardian topic | name= 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
https://www.theguardian.com/music/aretha-franklin
Usage
* {{Guardian topic | music/aretha-franklin }}
* {{Guardian topic | id= music/aretha-franklin }}
Output

Two parameters

URL
https://www.theguardian.com/us-news/bill-gates
Usage
* {{Guardian topic | us-news/bill-gates | Bill Gates }}
* {{Guardian topic | id= us-news/bill-gates | name= Bill Gates }}
Output

No ID in template or Wikidata

Usage
* {{Guardian topic}}
Output

TemplateData

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Guardian topic in articles based on its TemplateData.

TemplateData for Guardian topic

This template generates an external link to a topic page at The Guardian website. It is intended for use in the external links section of an article.

Template parameters

ParameterDescriptionTypeStatus
ID1 id

The "id" parameter (or unnamed parameter "1") may be used to specify the ID portion of the URL. Example: music/aretha-franklin is the ID in https://www.theguardian.com/music/aretha-franklin. This parameter is optional if Wikidata property P3106 exists, but required if not.

Default
Wikidata property P3106
Stringoptional
Name2 name

The "name" parameter (or unnamed parameter "2") may be used to specify the topic name, which is displayed in the link text. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation.

Default
{{PAGENAMEBASE}}
Stringoptional

Tracking categories

ID parameter exists
ID parameter does not exist

See also


Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.