Difference between revisions of "Template:Letterboxd title/doc"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
(create documentation)
 
imported>Zyxw
(document third parameter)
 
Line 11: Line 11:
 
: {{tlcw|{{BASEPAGENAME}} | <var>ID</var> }}
 
: {{tlcw|{{BASEPAGENAME}} | <var>ID</var> }}
 
: {{tlcw|{{BASEPAGENAME}} | <var>ID</var> | <var>TITLE</var> }}
 
: {{tlcw|{{BASEPAGENAME}} | <var>ID</var> | <var>TITLE</var> }}
 +
: {{tlcw|{{BASEPAGENAME}} | <var>ID</var> | <var>TITLE</var> | <var>DESCRIPTION</var> }}
  
 
Named parameters:
 
Named parameters:
 
: {{tlcw|{{BASEPAGENAME}} | id{{=}} <var>ID</var> }}
 
: {{tlcw|{{BASEPAGENAME}} | id{{=}} <var>ID</var> }}
 
: {{tlcw|{{BASEPAGENAME}} | id{{=}} <var>ID</var> | title{{=}} <var>TITLE</var> }}
 
: {{tlcw|{{BASEPAGENAME}} | id{{=}} <var>ID</var> | title{{=}} <var>TITLE</var> }}
 +
: {{tlcw|{{BASEPAGENAME}} | id{{=}} <var>ID</var> | title{{=}} <var>TITLE</var> | description{{=}} <var>DESCRIPTION</var> }}
  
 
Using [[Wikidata]] property [[d:Property:P6127|P6127]]:
 
Using [[Wikidata]] property [[d:Property:P6127|P6127]]:
 
: {{tlcw|{{BASEPAGENAME}} }}
 
: {{tlcw|{{BASEPAGENAME}} }}
 
: {{tlcw|{{BASEPAGENAME}} | title{{=}} <var>TITLE</var> }}
 
: {{tlcw|{{BASEPAGENAME}} | title{{=}} <var>TITLE</var> }}
 +
: {{tlcw|{{BASEPAGENAME}} | title{{=}} <var>TITLE</var> | description{{=}} <var>DESCRIPTION</var> }}
  
 
== Examples ==
 
== Examples ==
Line 28: Line 31:
 
''Usage:''
 
''Usage:''
 
: {{tlcw|a=1|{{BASEPAGENAME}} | the-empire-strikes-back | The Empire Strikes Back }}
 
: {{tlcw|a=1|{{BASEPAGENAME}} | the-empire-strikes-back | The Empire Strikes Back }}
 +
: {{tlcw|a=1|{{BASEPAGENAME}} | the-empire-strikes-back | The Empire Strikes Back | (1980 film) }}
  
 
''Output:''
 
''Output:''
 
:* {{{{BASEPAGENAME}} | the-empire-strikes-back | The Empire Strikes Back }}
 
:* {{{{BASEPAGENAME}} | the-empire-strikes-back | The Empire Strikes Back }}
 +
:* {{{{BASEPAGENAME}} | the-empire-strikes-back | The Empire Strikes Back | (1980 film) }}
  
 
=== Named parameters ===
 
=== Named parameters ===
Line 37: Line 42:
  
 
''Usage:''
 
''Usage:''
: {{tlcw|a=1|{{BASEPAGENAME}} | id{{=}} the-lion-king | title{{=}} The Lion King }}
+
: {{tlcw|a=1|{{BASEPAGENAME}} |id{{=}} the-lion-king |title{{=}} The Lion King }}
 +
: {{tlcw|a=1|{{BASEPAGENAME}} |id{{=}} the-lion-king |title{{=}} The Lion King |description{{=}} (1994 film) }}
  
 
''Output:''
 
''Output:''
:* {{{{BASEPAGENAME}} | id= the-lion-king | title= The Lion King }}
+
:* {{{{BASEPAGENAME}} |id= the-lion-king |title= The Lion King }}
 +
:* {{{{BASEPAGENAME}} |id= the-lion-king |title= The Lion King |description= (1994 film) }}
  
 
=== No ID in template or Wikidata ===
 
=== No ID in template or Wikidata ===
Line 53: Line 60:
 
<templatedata>
 
<templatedata>
 
{
 
{
  "description": "This template displays an external link to a web page for a film title at the Letterboxd website. It is intended for use in the external links section of an article.",
+
"description": "This template displays an external link to a web page for a film title at the Letterboxd website. It is intended for use in the external links section of an article.",
  "params": {
+
"params": {
    "id": {
+
"id": {
      "label": "id",
+
"aliases": ["1"],  
      "aliases": ["1"],  
+
"label": "ID",
      "description": "The ID portion of the URL. Example: the-lion-king in https://letterboxd.com/film/the-lion-king/. This parameter is optional if Wikidata property P6127 exists, but required if not.",
+
"description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion of the URL. Example: the-lion-king is the ID in https://letterboxd.com/film/the-lion-king/. This parameter is optional if Wikidata property P6127 exists, but required if not.",
      "type": "string",
+
"type": "string",
      "required": false,
+
"required": false,
      "default": "Wikidata property P6127"
+
"default": "Wikidata property P6127"
    },
+
},
    "title": {
+
"title": {
      "label": "title",
+
"aliases": ["2"],  
      "aliases": ["2"],  
+
"label": "Title",
      "description": "Title of film used as the link text. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as \"(film)\".",
+
"description": "The \"title\" parameter (or unnamed parameter \"2\") may be used to specify the film title, which is displayed in italic type in the link text. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as \"(film)\".",
      "type": "string",
+
"type": "string",
      "required": false,
+
"required": false,
      "default": "{{PAGENAMEBASE}}"
+
"default": "{{PAGENAMEBASE}}"
    }
+
},
  },
+
"description": {
  "paramOrder": [
+
"aliases" : [ "3" ],
    "id",
+
"label": "Description",
    "title"
+
"description": "The \"description\" parameter (or unnamed parameter \"3\") may be used to specify a description of the title, which is displayed after the title in the link text. This parameter is optional.",
  ]
+
"type": "string",
 +
"required": false
 +
}
 +
},
 +
"paramOrder": [
 +
"id",
 +
"title",
 +
"description"
 +
]
 
}
 
}
 
</templatedata>
 
</templatedata>

Latest revision as of 23:26, 9 August 2020

Template:Template redirect Template:Uses Wikidata

Template:Letterboxd title displays an external link to a web page for a film title at the Letterboxd website. It is intended for use in the external links section of an article.

Usage

Unnamed parameters:

Template:Tlcw
Template:Tlcw
Template:Tlcw

Named parameters:

Template:Tlcw
Template:Tlcw
Template:Tlcw

Using Wikidata property P6127:

Template:Tlcw
Template:Tlcw
Template:Tlcw

Examples

Unnamed parameters

URL:

https://letterboxd.com/film/the-empire-strikes-back/

Usage:

Template:Tlcw
Template:Tlcw

Output:

Named parameters

URL:

https://letterboxd.com/film/the-lion-king/

Usage:

Template:Tlcw
Template:Tlcw

Output:

No ID in template or Wikidata

Usage
Template:Tlcw
Output

TemplateData

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 Letterboxd title

This template displays an external link to a web page for a film title at the Letterboxd website. It is intended for use in the external links section of an article.

Template parameters

ParameterDescriptionTypeStatus
IDid 1

The "id" parameter (or unnamed parameter "1") should contain the ID portion of the URL. Example: the-lion-king is the ID in https://letterboxd.com/film/the-lion-king/. This parameter is optional if Wikidata property P6127 exists, but required if not.

Default
Wikidata property P6127
Stringoptional
Titletitle 2

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

Default
{{PAGENAMEBASE}}
Stringoptional
Descriptiondescription 3

The "description" parameter (or unnamed parameter "3") may be used to specify a description of the title, which is displayed after the title in the link text. This parameter is optional.

Stringoptional

See also