Difference between revisions of "Template:Emporis/doc"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
m (update category)
imported>Zyxw
(update usage, parameter list, and examples)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
 
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata -->
 
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata -->
{{Uses Wikidata|P455}}
+
{{Uses Wikidata|P455|P2270}}
{{Uses Wikidata|P2270}}
+
 
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
+
'''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an [[Wikipedia:External links|external link]] to an [[Emporis]] web page about a building or complex.
This is a template for linking to entries in the [[Emporis]] database.
 
  
 
== Usage ==
 
== Usage ==
<nowiki>{{</nowiki>Emporis|id=|name=|complex=}}
 
  
=== Parameters ===
+
=== building ===
; <code>id</code>: the "ID" of the database entry found in the structure's URL, e.g. "240620" in "<nowiki>http://www.emporis.com/buildings/240620/chicago-spire-chicago-il-usa</nowiki>". If not provided, the template will attempt to fetch the value from [[Wikidata]].
+
:; ID only (uses Wikipedia article name as link text)
; <code>name</code>: the name of the linked-to article, as it appears in the ''Emporis'' database; the default is the article's pagename
+
: {{tlcw|{{BASEPAGENAME}} | <var>ID</var> }}
; <code>complex</code>: set to "yes" if linking to a complex
+
: {{tlcw|{{BASEPAGENAME}} | id{{=}} <var>ID</var> }}
 +
 
 +
:; ID with name
 +
: {{tlcw|{{BASEPAGENAME}} | <var>ID</var> | <var>NAME</var> }}
 +
: {{tlcw|{{BASEPAGENAME}} | id{{=}} <var>ID</var> | name{{=}} <var>NAME</var> }}
 +
 
 +
:; Using [[Wikidata]] property {{prop|455}}
 +
: {{tlcw|{{BASEPAGENAME}} }}
 +
: {{tlcw|{{BASEPAGENAME}} | name{{=}} <var>NAME</var> }}
 +
 
 +
=== complex ===
 +
:; ID only (uses Wikipedia article name as link text)
 +
: {{tlcw|{{BASEPAGENAME}} | <var>ID</var> | complex{{=}} yes }}
 +
: {{tlcw|{{BASEPAGENAME}} | id{{=}} <var>ID</var> | complex{{=}} yes }}
 +
 
 +
:; ID with name
 +
: {{tlcw|{{BASEPAGENAME}} | <var>ID</var> | <var>NAME</var> | complex{{=}} yes }}
 +
: {{tlcw|{{BASEPAGENAME}} | id{{=}} <var>ID</var> | name{{=}} <var>NAME</var> | complex{{=}} yes }}
 +
 
 +
:; Using [[Wikidata]] property {{prop|2270}}
 +
: {{tlcw|{{BASEPAGENAME}} | complex{{=}} yes }}
 +
: {{tlcw|{{BASEPAGENAME}} | name{{=}} <var>NAME</var> | complex{{=}} yes }}
 +
 
 +
== Parameters ==
 +
; id {{nobold|or unnamed parameter}} 1
 +
: The "ID" of the database entry found in the structure's URL, e.g. "240620" in "<nowiki>http://www.emporis.com/buildings/240620/chicago-spire-chicago-il-usa</nowiki>". If not provided, the template will attempt to fetch the value from [[Wikidata]].
 +
; name {{nobold|or unnamed parameter}} 2
 +
: The name of the linked-to article, as it appears in the ''Emporis'' database; the default is the article's pagename.
 +
; complex
 +
: Set to "yes" if linking to a complex.
 +
 
 +
== Examples ==
 +
; building
 +
: <kbd>[https://www.emporis.com/buildings/240620/chicago-spire-chicago-il-usa https://www.emporis.com/buildings/{{Hilite|240620}}/chicago-spire-chicago-il-usa]</kbd>
 +
: {{#invoke:DemoTemplate|{{BASEPAGENAME}} | 240620 | Chicago Spire }}
 +
: {{#invoke:DemoTemplate|{{BASEPAGENAME}} | id= 240620 | name= Chicago Spire }}
 +
 
 +
; complex
 +
: <kbd>[https://www.emporis.com/complex/102057/metro-plaza-guangzhou-china https://www.emporis.com/complex/{{Hilite|102057}}/metro-plaza-guangzhou-china]</kbd>
 +
: {{#invoke:DemoTemplate|{{BASEPAGENAME}} | 102057 | Metro Plaza | complex= yes }}
 +
: {{#invoke:DemoTemplate|{{BASEPAGENAME}} | id= 102057 | name= Metro Plaza | complex= yes }}
  
=== Examples ===
+
; missing ID and Wikidata property not defined
* {{#invoke:DemoTemplate|{{BASEPAGENAME}}|id=240620|name=Chicago Spire}}
+
: {{#invoke:DemoTemplate|{{BASEPAGENAME}}}}
* {{#invoke:DemoTemplate|{{BASEPAGENAME}}|id=102057|name=Metro Plaza|complex=yes}}
 
  
 
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
 
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |

Revision as of 14:25, 30 January 2019

Template:Uses Wikidata

Template:Emporis displays an external link to an Emporis web page about a building or complex.

Usage

building

ID only (uses Wikipedia article name as link text)
Template:Tlcw
Template:Tlcw
ID with name
Template:Tlcw
Template:Tlcw
Using Wikidata property Template:Prop
Template:Tlcw
Template:Tlcw

complex

ID only (uses Wikipedia article name as link text)
Template:Tlcw
Template:Tlcw
ID with name
Template:Tlcw
Template:Tlcw
Using Wikidata property Template:Prop
Template:Tlcw
Template:Tlcw

Parameters

id or unnamed parameter 1
The "ID" of the database entry found in the structure's URL, e.g. "240620" in "http://www.emporis.com/buildings/240620/chicago-spire-chicago-il-usa". If not provided, the template will attempt to fetch the value from Wikidata.
name or unnamed parameter 2
The name of the linked-to article, as it appears in the Emporis database; the default is the article's pagename.
complex
Set to "yes" if linking to a complex.

Examples

building
https://www.emporis.com/buildings/240620/chicago-spire-chicago-il-usa
{{Emporis| 240620 | Chicago Spire }}Chicago Spire at EmporisScript error: No such module "EditAtWikidata".
{{Emporis|id=240620|name=Chicago Spire}}Chicago Spire at EmporisScript error: No such module "EditAtWikidata".
complex
https://www.emporis.com/complex/102057/metro-plaza-guangzhou-china
{{Emporis| 102057 | Metro Plaza |complex=yes}}Metro Plaza at EmporisScript error: No such module "EditAtWikidata".
{{Emporis|id=102057|name=Metro Plaza|complex=yes}}Metro Plaza at EmporisScript error: No such module "EditAtWikidata".
missing ID and Wikidata property not defined
{{Emporis}}Template:PAGENAMEBASE at EmporisScript error: No such module "EditAtWikidata".