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

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
({{Wikidata property|P1218}})
imported>Zyxw
(update usage and examples for use of Wikidata property, add TemplateData, add categories)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AT THE BOTTOM OF THIS PAGE. -->
+
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
{{Wikidata property|P1218}}
+
{{Uses Wikidata|P1218}}
 +
{{Lua|Module:EditAtWikidata}}
  
==Usage==
+
'''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to a production's web page at the [[Internet Broadway Database]] (IBDB), operated by the [[The Broadway League]]. It is intended for use in the [[Wikipedia:External links|external links]] section of an article.
<pre>
 
{{IBDB title | id | title}}
 
</pre>
 
  
produces:
+
== Usage ==
:{{IBDB title|id|title}}
+
Unnamed parameters:
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | <var>ID</var> }}</code>
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | <var>ID</var> | <var>TITLE</var> }}</code>
 +
 
 +
Named parameters:
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= <var>ID</var> }}</code>
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= <var>ID</var> | title= <var>TITLE</var> }}</code>
 +
 
 +
Using [[Wikidata]] property [[d:Property:P1218|P1218]]:
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | title= <var>TITLE</var> <nowiki>}}</nowiki></code>
  
 
Where:
 
Where:
:<code>id</code> = production ID number at IBDB
+
: <var>ID</var> = '''production ID''' number at IBDB
:<code>title</code> = optional title, otherwise defaults to the page name
+
:: This should not be confused with the '''show ID''' which is used in {{tlx|IBDB show}}
 +
: <var>TITLE</var> = optional title, otherwise defaults to the page name
 +
:: Portions of the title which should not be in italics can be marked with {{tlx|Noitalic}}
 +
 
 +
== Examples ==
 +
 
 +
=== Unnamed parameters ===
 +
''URLs:''
 +
: <kbd><nowiki>https://www.ibdb.com/broadway-production/the-seagull-</nowiki>{{Hilite|2719}}</kbd>
 +
: <kbd><nowiki>https://www.ibdb.com/broadway-production/</nowiki>{{Hilite|2719}}</kbd>
 +
: <kbd><nowiki>https://www.ibdb.com/production.php?id=</nowiki>{{Hilite|2719}}</kbd>
 +
 
 +
''Usage:''
 +
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | 7749 | The Seagull{{noitalic| (1916 production)}} <nowiki>}}</nowiki></code>
 +
 
 +
''Output:''
 +
:* {{{{BASEPAGENAME}} | 7749 | The Seagull{{noitalic| (1916 production)}} }}
 +
 
 +
=== Named parameters ===
 +
''URLs:''
 +
: <kbd><nowiki>https://www.ibdb.com/broadway-production/the-crucible-</nowiki>{{Hilite|2211}}</kbd>
 +
: <kbd><nowiki>https://www.ibdb.com/broadway-production/</nowiki>{{Hilite|2211}}</kbd>
 +
: <kbd><nowiki>https://www.ibdb.com/production.php?id=</nowiki>{{Hilite|2211}}</kbd>
 +
 
 +
''Usage:''
 +
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | id= 2211 | title= The Crucible{{noitalic| (1953 production)}} <nowiki>}}</nowiki></code>
 +
 
 +
''Output:''
 +
:* {{{{BASEPAGENAME}} | id= 2211 | title= The Crucible{{noitalic| (1953 production)}} }}
 +
 
 +
=== No ID in template or Wikidata ===
 +
''Usage:''
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
  
'''Example'''
+
''Output:''
<pre>{{IBDB title|id=7749|title=The Seagull{{noitalic| (1916 production)}}}}</pre>
+
: {{ {{BASEPAGENAME}} }}
:produces
 
{{IBDB title|id=7749|title=The Seagull{{noitalic| (1916 production)}}}}
 
  
'''Notes'''
+
==TemplateData==
*<code>id</code>: this template requires the IBDB '''production ID''', which should not be confused with the IBDB '''show ID'''.
+
{{TemplateData header}}
*<code>title</code>: portions of <code>title</code> that should not be in italics ought to be marked with {{tlx|noitalic}}.
+
<templatedata>
 +
{
 +
        "description": "This template displays an external link to a production's web page at the Internet Broadway Database (IBDB), operated by the The Broadway League. It is intended for use in the external links section of an article.",
 +
        "params": {
 +
                "id": {
 +
                        "aliases" : [ "1" ],
 +
                        "label": "ID",
 +
                        "description": "The \"id\" parameter (or unnamed parameter \"1\") may be used to specify the ID portion of the URL. Example: 2719 is the ID in https://www.ibdb.com/broadway-production/the-seagull-2719, https://www.ibdb.com/broadway-production/2719, or https://www.ibdb.com/production.php?id=2719. This parameter is optional if Wikidata property P1218 exists, but required if not.",
 +
                        "type": "number",
 +
"default": "Wikidata property P1218",
 +
                        "required": false
 +
                },
 +
                "title": {
 +
                        "aliases" : [ "2" ],
 +
                        "label": "Title",
 +
                        "description": "The \"title\" parameter (or unnamed parameter \"2\") may be used to specify the production 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.",
 +
                        "type": "string",
 +
"default": "{{PAGENAMEBASE}}",
 +
                        "required": false
 +
                }
 +
},
 +
"paramOrder": [
 +
"id",
 +
"title"
 +
]
 +
}
 +
</templatedata>
  
 
==See also==
 
==See also==
*{{tl|IBDB show}} for shows with multiple productions
+
* {{tl|IBDB show}} for shows with multiple productions
*{{tl|IBDB name}} for the names of individual people
+
* {{tl|IBDB name}} for the names of individual people
*{{tl|IBDB venue}} for named theatres
+
* {{tl|IBDB venue}} for named theatres
  
<includeonly>
+
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
 +
<!-- Categories go here and interwikis go in Wikidata. -->
 
[[Category:Theatre external link templates]]
 
[[Category:Theatre external link templates]]
</includeonly>
+
[[Category:External link templates using Wikidata]]
 +
[[Category:Templates that add a tracking category]]
 +
}}</includeonly>

Revision as of 07:38, 1 August 2018

Template:Uses Wikidata

Template:IBDB title displays an external link to a production's web page at the Internet Broadway Database (IBDB), operated by the The Broadway League. It is intended for use in the external links section of an article.

Usage

Unnamed parameters:

{{IBDB title | ID }}
{{IBDB title | ID | TITLE }}

Named parameters:

{{IBDB title | id= ID }}
{{IBDB title | id= ID | title= TITLE }}

Using Wikidata property P1218:

{{IBDB title}}
{{IBDB title | title= TITLE }}

Where:

ID = production ID number at IBDB
This should not be confused with the show ID which is used in {{IBDB show}}
TITLE = optional title, otherwise defaults to the page name
Portions of the title which should not be in italics can be marked with {{Noitalic}}

Examples

Unnamed parameters

URLs:

https://www.ibdb.com/broadway-production/the-seagull-2719
https://www.ibdb.com/broadway-production/2719
https://www.ibdb.com/production.php?id=2719

Usage:

* {{IBDB title | 7749 | The Seagull (1916 production) }}

Output:

Named parameters

URLs:

https://www.ibdb.com/broadway-production/the-crucible-2211
https://www.ibdb.com/broadway-production/2211
https://www.ibdb.com/production.php?id=2211

Usage:

* {{IBDB title | id= 2211 | title= The Crucible (1953 production) }}

Output:

No ID in template or Wikidata

Usage:

{{IBDB title}}

Output:

Template:PAGENAMEBASE at the Internet Broadway Database

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

This template displays an external link to a production's web page at the Internet Broadway Database (IBDB), operated by the The Broadway League. 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") may be used to specify the ID portion of the URL. Example: 2719 is the ID in https://www.ibdb.com/broadway-production/the-seagull-2719, https://www.ibdb.com/broadway-production/2719, or https://www.ibdb.com/production.php?id=2719. This parameter is optional if Wikidata property P1218 exists, but required if not.

Default
Wikidata property P1218
Numberoptional
Titletitle 2

The "title" parameter (or unnamed parameter "2") may be used to specify the production 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.

Default
{{PAGENAMEBASE}}
Stringoptional

See also