Difference between revisions of "Template:Crunchbase/doc"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
(add category)
imported>Zyxw
(Add links to new tracking categories.)
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
 
<!-- PLEASE ADD CATEGORIES AT THE BOTTOM OF THIS PAGE -->
 
<!-- PLEASE ADD CATEGORIES AT THE BOTTOM OF THIS PAGE -->
 
{{Template redirect|CrunchBase}}
 
{{Template redirect|CrunchBase}}
 +
{{Uses Wikidata|P2088|P2087}}
 +
{{Lua|Module:EditAtWikidata}}
  
=== Usage ===
+
'''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to the [[Crunchbase]] profile of an organization or a person. It is intended for use in the [[Wikipedia:External links|external links]] section of an article.
: {{tlcw|{{BASEPAGENAME}}}}
+
 
 +
== Usage ==
 +
Unnamed parameters:
 
: {{tlcw|{{BASEPAGENAME}} | <var>ID</var> }}
 
: {{tlcw|{{BASEPAGENAME}} | <var>ID</var> }}
 
: {{tlcw|{{BASEPAGENAME}} | <var>ID</var> | <var>NAME</var> }}
 
: {{tlcw|{{BASEPAGENAME}} | <var>ID</var> | <var>NAME</var> }}
 
: {{tlcw|{{BASEPAGENAME}} | <var>ID</var> | <var>NAME</var> | <var>TYPE</var> }}
 
: {{tlcw|{{BASEPAGENAME}} | <var>ID</var> | <var>NAME</var> | <var>TYPE</var> }}
  
* '''Parameter 1:''' ID as it appears in the Crunchbase URL (optional, default is created from Wikipeda article name)
+
Named parameters:
* '''Parameter 2:''' Name to display (optional, default is the current Wikipedia article name)
+
: {{tlcw|{{BASEPAGENAME}} | id{{=}} <var>ID</var> }}
* '''Parameter 3:''' Type of item as it appears in Crunchbase URL (optional, default is organization)
+
: {{tlcw|{{BASEPAGENAME}} | id{{=}} <var>ID</var> | name{{=}} <var>NAME</var> }}
 +
: {{tlcw|{{BASEPAGENAME}} | id{{=}} <var>ID</var> | name{{=}} <var>NAME</var> | type{{=}} <var>TYPE</var> }}
 +
 
 +
Using [[Wikidata]] property {{Property|2088|id=only}} or {{Property|2087|id=only}}:
 +
: {{tlcw|{{BASEPAGENAME}} }}
 +
: {{tlcw|{{BASEPAGENAME}} | name{{=}} <var>NAME</var> }}
 +
 
 +
== Parameters ==
 +
# '''id''' &ndash; ID as it appears in the Crunchbase URL (optional, default is created from Wikidata or the Wikipedia article name)
 +
# '''name''' &ndash; Name to display (optional, default is the current Wikipedia article name)
 +
# '''type''' &ndash; Type of item as it appears in Crunchbase URL (optional, default is organization)
  
 
== Examples ==
 
== Examples ==
Using <kbd><nowiki>{{Crunchbase}}</nowiki></kbd> works fine in most articles, as it takes the article's title to create the URL. If not, then try one of the following methods:
+
Using <kbd><nowiki>{{Crunchbase}}</nowiki></kbd> works fine in most articles, as it uses [[Wikidata]] or the article's title to create the URL. If not, then try one of the following methods:
  
=== Organization ===
+
=== Organization (default) ===
 
; URL
 
; URL
 
: <kbd>[https://www.crunchbase.com/organization/apple https://www.crunchbase.com/'''organization'''/{{hilite|apple}}]</kbd>
 
: <kbd>[https://www.crunchbase.com/organization/apple https://www.crunchbase.com/'''organization'''/{{hilite|apple}}]</kbd>
  
 
; Usage
 
; Usage
: <kbd><nowiki>{{Crunchbase | apple | Apple Inc. }}</nowiki></kbd>
+
: {{tlcw|a=1|{{BASEPAGENAME}} | apple | Apple Inc. }}
: <kbd><nowiki>{{Crunchbase | apple | Apple Inc. | organization }}</nowiki></kbd>
+
: {{tlcw|a=1|{{BASEPAGENAME}} | apple | Apple Inc. | organization }}
: <kbd><nowiki>{{Crunchbase company | apple | Apple Inc. }}</nowiki></kbd>
+
: {{tlcw|a=1|Crunchbase company | apple | Apple Inc. }}
  
 
; Output
 
; Output
: {{Crunchbase | apple | Apple Inc. }}
+
:* {{{{BASEPAGENAME}} | apple | Apple Inc. }}
: {{Crunchbase | apple | Apple Inc. | organization }}
+
:* {{{{BASEPAGENAME}} | apple | Apple Inc. | organization }}
: {{Crunchbase company | apple | Apple Inc. }}
+
:* {{Crunchbase company | apple | Apple Inc. }}
  
 
=== Person ===
 
=== Person ===
Line 35: Line 49:
  
 
; Usage
 
; Usage
: <kbd><nowiki>{{Crunchbase | steve-jobs | Steve Jobs | person }}</nowiki></kbd>
+
: {{tlcw|a=1|{{BASEPAGENAME}} | steve-jobs | Steve Jobs | person }}
: <kbd><nowiki>{{Crunchbase person | steve-jobs | Steve Jobs }}</nowiki></kbd>
+
: {{tlcw|a=1|Crunchbase person | steve-jobs | Steve Jobs }}
  
 
; Output
 
; Output
: {{Crunchbase | steve-jobs | Steve Jobs | person }}
+
:* {{{{BASEPAGENAME}} | steve-jobs | Steve Jobs | person }}
: {{Crunchbase person | steve-jobs | Steve Jobs }}
+
:* {{Crunchbase person | steve-jobs | Steve Jobs }}
  
 
== TemplateData ==
 
== TemplateData ==
Line 46: Line 60:
 
<templatedata>
 
<templatedata>
 
{
 
{
 +
"description": "This template displays an external link to the Crunchbase profile of an organization or a person. It is intended for use in the external links section of an article.",
 +
"format": "inline",
 
"params": {
 
"params": {
"1": {
+
"id": {
"description": "ID as it appears in the Crunchbase URL (optional, default is created from Wikipeda article name)",
+
"label": "id",
 +
"aliases": ["1"],
 +
"description": "ID as it appears in the Crunchbase URL (optional, default is created from Wikidata or the Wikipedia article name)",
 
"example": "apple",
 
"example": "apple",
 
"type": "string",
 
"type": "string",
 
"suggested": true
 
"suggested": true
 
},
 
},
"2": {
+
"name": {
 +
"label": "name",
 +
"aliases": ["2"],
 
"description": "Name to display (optional, default is the current Wikipedia article name)",
 
"description": "Name to display (optional, default is the current Wikipedia article name)",
 
"example": "Apple Inc.",
 
"example": "Apple Inc.",
Line 59: Line 79:
 
"suggested": true
 
"suggested": true
 
},
 
},
"3": {
+
"type": {
 +
"label": "type",
 +
"aliases": ["3"],
 
"description": "Type of item as it appears in Crunchbase URL (optional, default is organization))",
 
"description": "Type of item as it appears in Crunchbase URL (optional, default is organization))",
 
"example": "organization",
 
"example": "organization",
Line 66: Line 88:
 
}
 
}
 
},
 
},
"description": "Adds external link to the Crunchbase profile of an organization or person.",
 
 
"paramOrder": [
 
"paramOrder": [
"1",
+
"id",
"2",
+
"name",
"3"
+
"type"
],
+
]
"format": "inline"
 
 
}
 
}
 
</templatedata>
 
</templatedata>
 +
 +
== Tracking categories ==
 +
; ID parameter exists
 +
* {{clc|Crunchbase template with organization ID}}
 +
* {{clc|Crunchbase template with person ID}}
 +
; ID parameter does not exist
 +
* {{clc|Crunchbase template using Wikidata}}
 +
* {{clc|Crunchbase template missing ID and not in Wikidata}}
  
 
== See also ==
 
== See also ==
Line 84: Line 112:
 
[[Category:Company external link templates]]
 
[[Category:Company external link templates]]
 
[[Category:People and person external link templates]]
 
[[Category:People and person external link templates]]
 +
[[Category:External link templates using Wikidata]]
 +
[[Category:Templates that add a tracking category]]
 
}}</includeonly>
 
}}</includeonly>

Latest revision as of 03:03, 17 March 2019

Template:Template redirect Template:Uses Wikidata

Template:Crunchbase displays an external link to the Crunchbase profile of an organization or a person. 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 Template:Property or Template:Property:

Template:Tlcw
Template:Tlcw

Parameters

  1. id – ID as it appears in the Crunchbase URL (optional, default is created from Wikidata or the Wikipedia article name)
  2. name – Name to display (optional, default is the current Wikipedia article name)
  3. type – Type of item as it appears in Crunchbase URL (optional, default is organization)

Examples

Using {{Crunchbase}} works fine in most articles, as it uses Wikidata or the article's title to create the URL. If not, then try one of the following methods:

Organization (default)

URL
https://www.crunchbase.com/organization/apple
Usage
Template:Tlcw
Template:Tlcw
Template:Tlcw
Output

Person

URL
https://www.crunchbase.com/person/steve-jobs
Usage
Template:Tlcw
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 Crunchbase

This template displays an external link to the Crunchbase profile of an organization or a person. It is intended for use in the external links section of an article.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
idid 1

ID as it appears in the Crunchbase URL (optional, default is created from Wikidata or the Wikipedia article name)

Example
apple
Stringsuggested
namename 2

Name to display (optional, default is the current Wikipedia article name)

Example
Apple Inc.
Stringsuggested
typetype 3

Type of item as it appears in Crunchbase URL (optional, default is organization))

Example
organization
Stringsuggested

Tracking categories

ID parameter exists
ID parameter does not exist

See also