Difference between revisions of "Template:IBDB venue/doc"
imported>Zyxw ({{Wikidata property|P1217}}) |
imported>Zyxw (update usage, examples, TemplateData, and categories for use of Wikidata property) |
||
Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
− | <!--Categories | + | <!-- Categories go at the bottom of this page and interwikis go in Wikidata. --> |
− | {{Wikidata | + | {{Uses Wikidata|P1217}} |
+ | {{Lua|Module:EditAtWikidata}} | ||
− | + | '''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to a venue (theatre) 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. | |
== Usage == | == Usage == | ||
− | + | Unnamed parameters: | |
− | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | | + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | <var>ID</var> }}</code> |
− | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | | + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | <var>ID</var> | <var>VENUE</var> }}</code> |
− | + | Named parameters: | |
− | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | | + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= <var>ID</var> }}</code> |
− | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= | + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= <var>ID</var> | venue= <var>VENUE</var> }}</code> |
+ | |||
+ | Using [[Wikidata]] property [[d:Property:P1217|P1217]]: | ||
+ | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code> | ||
+ | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | venue= <var>VENUE</var> <nowiki>}}</nowiki></code> | ||
== Instructions == | == Instructions == | ||
Line 22: | Line 27: | ||
== Examples == | == Examples == | ||
− | |||
− | |||
− | + | === Unnamed parameters === | |
− | + | ''URLs:'' | |
− | + | : <kbd><nowiki>https://www.ibdb.com/theatre/gershwin-theatre-</nowiki>{{Hilite|1369}}</kbd> | |
− | + | : <kbd><nowiki>https://www.ibdb.com/theatre/</nowiki>{{Hilite|1369}}</kbd> | |
− | + | : <kbd><nowiki>https://www.ibdb.com/venue.php?id=</nowiki>{{Hilite|1369}}</kbd> | |
+ | |||
+ | ''Usage:'' | ||
+ | : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | 1369 | Gershwin Theatre <nowiki>}}</nowiki></code> | ||
+ | |||
+ | ''Output:'' | ||
+ | :* {{{{BASEPAGENAME}} | 1369 | Gershwin Theatre }} | ||
+ | |||
+ | === Named parameters === | ||
+ | ''URLs:'' | ||
+ | : <kbd><nowiki>https://www.ibdb.com/theatre/american-airlines-theatre-</nowiki>{{Hilite|1349}}</kbd> | ||
+ | : <kbd><nowiki>https://www.ibdb.com/theatre/</nowiki>{{Hilite|1349}}</kbd> | ||
+ | : <kbd><nowiki>https://www.ibdb.com/venue.php?id=</nowiki>{{Hilite|1349}}</kbd> | ||
+ | |||
+ | ''Usage:'' | ||
+ | : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | id= 1349 | venue= American Airlines Theatre <nowiki>}}</nowiki></code> | ||
+ | |||
+ | ''Output:'' | ||
+ | :* {{{{BASEPAGENAME}} | id= 1349 | venue= American Airlines Theatre }} | ||
+ | |||
+ | === No ID in template or Wikidata === | ||
+ | ''Usage:'' | ||
+ | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code> | ||
− | + | ''Output:'' | |
− | + | : {{ {{BASEPAGENAME}} }} | |
− | |||
− | |||
− | |||
− | == | + | == TemplateData == |
− | {{ | + | {{TemplateData header}} |
<templatedata> | <templatedata> | ||
{ | { | ||
− | "description": "This template | + | "description": "This template displays an external link to a venue (theatre) 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: 1369 is the ID in https://www.ibdb.com/theatre/gershwin-theatre-1369 or https://www.ibdb.com/theatre/1369 or https://www.ibdb.com/venue.php?id=1369. This parameter is optional if Wikidata property P1217 exists, but required if not.", | |
− | " | + | "type": "number", |
− | + | "default": "Wikidata property P1217", | |
− | + | "required": false | |
− | + | }, | |
− | + | "venue": { | |
− | + | "aliases" : [ "2" ], | |
− | + | "label": "Venue", | |
− | "required": false, | + | "description": "The \"venue\" parameter (or unnamed parameter \"2\") may be used to specify the venue (theatre) name, which is displayed 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", | ||
+ | "venue" | ||
+ | ] | ||
} | } | ||
</templatedata> | </templatedata> | ||
Line 68: | Line 96: | ||
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | | <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | | ||
<!--Categories below this line, please; interwikis at Wikidata--> | <!--Categories below this line, please; interwikis at Wikidata--> | ||
− | [[Category:Theatre external link templates | + | [[Category:Theatre external link templates]] |
− | [[Category:Musical Theatre templates | + | [[Category:Musical Theatre templates]] |
+ | [[Category:External link templates using Wikidata]] | ||
}}</includeonly> | }}</includeonly> |
Revision as of 08:06, 1 August 2018
![]() | This is a documentation subpage for Template:IBDB venue. It contains usage information, categories and other content that is not part of the original template page. |
![]() | This template uses Lua: |
Template:IBDB venue displays an external link to a venue (theatre) 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.
Contents
Usage
Unnamed parameters:
{{IBDB venue | ID }}
{{IBDB venue | ID | VENUE }}
Named parameters:
{{IBDB venue | id= ID }}
{{IBDB venue | id= ID | venue= VENUE }}
Using Wikidata property P1217:
{{IBDB venue}}
{{IBDB venue | venue= VENUE }}
Instructions
- Go to IBDB.com and search for a venue (theatre) name
- Click on the correct link to go to the venue (theatre) page
- The page URL should look like
http://ibdb.com/theatre/name-of-theatre-#####
- where "#####" indicates a number.
Examples
Unnamed parameters
URLs:
- https://www.ibdb.com/theatre/gershwin-theatre-1369
- https://www.ibdb.com/theatre/1369
- https://www.ibdb.com/venue.php?id=1369
Usage:
* {{IBDB venue | 1369 | Gershwin Theatre }}
Output:
- Gershwin Theatre at the Internet Broadway DatabaseScript error: No such module "EditAtWikidata".
Named parameters
URLs:
- https://www.ibdb.com/theatre/american-airlines-theatre-1349
- https://www.ibdb.com/theatre/1349
- https://www.ibdb.com/venue.php?id=1349
Usage:
* {{IBDB venue | id= 1349 | venue= American Airlines Theatre }}
Output:
- American Airlines Theatre at the Internet Broadway DatabaseScript error: No such module "EditAtWikidata".
No ID in template or Wikidata
Usage:
{{IBDB venue}}
Output:
- Template:PAGENAMEBASE at the Internet Broadway DatabaseScript error: No such module "EditAtWikidata".
TemplateData
TemplateData for IBDB venue
This template displays an external link to a venue (theatre) 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.
Parameter | Description | Type | Status | |
---|---|---|---|---|
ID | id 1 | The "id" parameter (or unnamed parameter "1") may be used to specify the ID portion of the URL. Example: 1369 is the ID in https://www.ibdb.com/theatre/gershwin-theatre-1369 or https://www.ibdb.com/theatre/1369 or https://www.ibdb.com/venue.php?id=1369. This parameter is optional if Wikidata property P1217 exists, but required if not.
| Number | optional |
Venue | venue 2 | The "venue" parameter (or unnamed parameter "2") may be used to specify the venue (theatre) name, which is displayed in the link text. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation.
| String | optional |
See also
- {{IBDB name}}
- {{IBDB title}}
- {{IBDB show}}