Difference between revisions of "Template:IFDB/doc"

From blackwiki
Jump to navigation Jump to search
imported>Rqndom
m (Rqndom moved page User:Rqndom/IFDB/doc to Template:IFDB/doc: move template doc subpage draft)
imported>Rqndom
(+ cat)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
 
<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata -->
 
<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata -->
Use this template to reference entries on the [https://ifdb.tads.org/ Interactive Fiction Database].
+
{{Format TemplateData|JSON=
== Usage ==
+
{
Sample usage:
+
"params": {
 +
"id": {
 +
"description": "the IFDB game id (listed as '''TUID''' under Game Details); if empty or not specified, the id is obtained from wikidata",
 +
"example": "0dbnusxunq7fw5ro",
 +
"type": "line",
 +
"required": false
 +
},
 +
"title": {
 +
"description": "the title of the game, to be shown as link text; if empty or not specified, the article title is used",
 +
"example": "Zork I",
 +
"type": "line",
 +
"required": false,
 +
"suggested": true
 +
}
 +
},
 +
"description": "Use this template to reference entries on the [https://ifdb.tads.org/ Interactive Fiction Database].",
 +
"format": "inline"
 +
}
 +
|TOC=1}}
 +
 
 +
== Sample usage ==
 +
* Specify <code>id</code> and <code>title</code>:
 
<pre>
 
<pre>
 
{{IFDB | id=0dbnusxunq7fw5ro | title=Zork I}}
 
{{IFDB | id=0dbnusxunq7fw5ro | title=Zork I}}
 +
</pre>
 +
* Specify title only (<code>id</code> is read from Wikidata):
 +
<pre>
 +
{{IFDB | title=Zork I}}
 +
</pre>
 +
* Use without any parameters (<code>id</code> is read from Wikidata, and the article name is used for <code>title</code>):
 +
<pre>
 +
{{IFDB}}
 
</pre>
 
</pre>
  
== Parameters ==
+
== Note ==
; id
+
Always preview the page when using this template without specifying the <code>id</code>,
: the IFDB game id (listed as '''TUID''' under Game Details)
+
to make sure it is correctly imported from Wikidata.
 
 
; title
 
: the title of the game, to be shown as link text
 
  
 
<includeonly>{{sandbox other||
 
<includeonly>{{sandbox other||
 
<!-- Categories below this line; interwikis at Wikidata -->
 
<!-- Categories below this line; interwikis at Wikidata -->
 
+
[[Category:External link templates]]
 +
[[Category:Templates using data from Wikidata]]
 
}}</includeonly>
 
}}</includeonly>

Latest revision as of 18:27, 28 October 2020

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 IFDB

Use this template to reference entries on the Interactive Fiction Database.

Template parameters

ParameterDescriptionTypeStatus
idid
the IFDB game id (listed as TUID under Game Details); if empty or not specified, the id is obtained from wikidata
Example
0dbnusxunq7fw5ro
Lineoptional
titletitle
the title of the game, to be shown as link text; if empty or not specified, the article title is used
Example
Zork I
Linesuggested

Format: inline

Sample usage

  • Specify id and title:
{{IFDB | id=0dbnusxunq7fw5ro | title=Zork I}}
  • Specify title only (id is read from Wikidata):
{{IFDB | title=Zork I}}
  • Use without any parameters (id is read from Wikidata, and the article name is used for title):
{{IFDB}}

Note

Always preview the page when using this template without specifying the id, to make sure it is correctly imported from Wikidata.