Difference between revisions of "Template:Google Scholar id/doc"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
(update examples and TemplateData, add link)
Line 4: Line 4:
 
{{Lua|Module:EditAtWikidata}}
 
{{Lua|Module:EditAtWikidata}}
  
This template generates an external link to an person's profile at [[Google Scholar]].
+
'''{{NAMESPACE}}:{{BASEPAGENAME}}''' generates an external link to a person's profile at [[Google Scholar]].
  
 
== Usage ==
 
== Usage ==
Line 20: Line 20:
 
This parameter will be the ID string used in the [[URL]] at Google Scholar. When one parameter is used, the [[link text]] is the title of the Wikipedia article where the template is used.
 
This parameter will be the ID string used in the [[URL]] at Google Scholar. When one parameter is used, the [[link text]] is the title of the Wikipedia article where the template is used.
  
: URL: <code><nowiki>https://</nowiki>scholar.google.com/citations?user={{hilite|EeTd0CYAAAAJ}}</code>
+
''URL:''
# <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | EeTd0CYAAAAJ }}</code>
+
: <kbd><nowiki>https://</nowiki>scholar.google.com/citations?user={{hilite|EeTd0CYAAAAJ}}</kbd>
#: {{{{BASEPAGENAME}} | EeTd0CYAAAAJ }}
+
''Usage:''
# <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= EeTd0CYAAAAJ }}</code>
+
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | EeTd0CYAAAAJ }}</code>
#: {{{{BASEPAGENAME}} | id= EeTd0CYAAAAJ }}
+
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | id= EeTd0CYAAAAJ }}</code>
 +
''Output:''
 +
:* {{{{BASEPAGENAME}} | EeTd0CYAAAAJ }}
 +
:* {{{{BASEPAGENAME}} | id= EeTd0CYAAAAJ }}
  
 
[The name of the Wikipedia page you now are looking at is displayed above. The lead name will change according to the name of the Wikipedia page the template is used on.]
 
[The name of the Wikipedia page you now are looking at is displayed above. The lead name will change according to the name of the Wikipedia page the template is used on.]
Line 31: Line 34:
 
The first parameter will be the ID string used in the [[URL]] at Google Scholar. The second parameter will be used at the [[link text]].
 
The first parameter will be the ID string used in the [[URL]] at Google Scholar. The second parameter will be used at the [[link text]].
  
: URL: <code><nowiki>https://</nowiki>scholar.google.com/citations?user={{hilite|EeTd0CYAAAAJ}}</code>
+
''URL:''
# <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | EeTd0CYAAAAJ | Yoelle Maarek }}</code>
+
: <kbd><nowiki>https://</nowiki>scholar.google.com/citations?user={{hilite|EeTd0CYAAAAJ}}</kbd>
#: {{{{BASEPAGENAME}} | EeTd0CYAAAAJ| Yoelle Maarek }}
+
''Usage:''
# <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= EeTd0CYAAAAJ | name= Yoelle Maarek }}</code>
+
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | EeTd0CYAAAAJ | Yoelle Maarek }}</code>
#: {{{{BASEPAGENAME}} | id= EeTd0CYAAAAJ | name= Yoelle Maarek }}
+
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | id= EeTd0CYAAAAJ | name= Yoelle Maarek }}</code>
 +
''Output:''
 +
:* {{{{BASEPAGENAME}} | EeTd0CYAAAAJ| Yoelle Maarek }}
 +
:* {{{{BASEPAGENAME}} | id= EeTd0CYAAAAJ | name= Yoelle Maarek }}
  
 
=== No parameters and Wikidata property not defined ===
 
=== No parameters and Wikidata property not defined ===
 
''Usage:''
 
''Usage:''
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
+
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
 
''Output:''
 
''Output:''
: {{ {{BASEPAGENAME}} }}
+
:* {{ {{BASEPAGENAME}} }}
  
== Template data ==
+
== TemplateData ==
{{TemplateDataHeader}}
+
{{TemplateData header}}
 
<templatedata>
 
<templatedata>
 
{
 
{
         "description": "This template generates an external link to an account at Google Scholar.",
+
         "description": "This template generates an external link to a person's profile at Google Scholar.",
 
"params": {
 
"params": {
 
"id": {
 
"id": {
 
"label": "ID",
 
"label": "ID",
"description": "ID string used in the URL.",
+
"aliases": [ "1" ],
 +
"description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion of the URL. Example: EeTd0CYAAAAJ is the ID portion of https://scholar.google.com/citations?user=EeTd0CYAAAAJ. This parameter is optional if Wikidata property P1960 exists, but required if not.",
 
"type": "string",
 
"type": "string",
"required": true,
+
"required": false,
"aliases": [ "1" ]
+
"default": "Wikidata property P1960"
 
},
 
},
 
"name": {
 
"name": {
 
"label": "Name",
 
"label": "Name",
"description": "Name displayed as the link text. If not specified it defaults to the article's {{PAGENAME}}, without disambiguation.",
+
"aliases": [ "2" ],
 +
"description": "The \"name\" parameter (or unnamed parameter \"2\") may be used to specify the link text. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation.",
 
"type": "string",
 
"type": "string",
                        "required": false,
+
"required": false,
"aliases": [ "2" ]
+
"default": "{{PAGENAMEBASE}}"
 
}
 
}
}
+
},
 +
"paramOrder": [
 +
"id",
 +
"name"
 +
]
 
}
 
}
 
</templatedata>
 
</templatedata>
  
 
== See also ==
 
== See also ==
* {{Tl|AcademicSearch}}
+
* {{tl|AcademicSearch}}
* {{Tl|DBLP}}
+
* {{tl|DBLP}}
* {{Tl|MacTutor}}
+
* {{tl|MacTutor}}
 +
* {{tl|ResearchGate}}
 
{{Google templates}}
 
{{Google templates}}
  

Revision as of 09:41, 17 March 2019

Template:Uses Wikidata

Template:Google Scholar id generates an external link to a person's profile at Google Scholar.

Usage

One parameter:

{{Google Scholar id | ID }}
{{Google Scholar id | id= ID }}

Two parameters:

{{Google Scholar id | ID | NAME }}
{{Google Scholar id | id= ID | name= NAME }}

Examples

One parameter

This parameter will be the ID string used in the URL at Google Scholar. When one parameter is used, the link text is the title of the Wikipedia article where the template is used.

URL:

https://scholar.google.com/citations?user=EeTd0CYAAAAJ

Usage:

* {{Google Scholar id | EeTd0CYAAAAJ }}
* {{Google Scholar id | id= EeTd0CYAAAAJ }}

Output:

[The name of the Wikipedia page you now are looking at is displayed above. The lead name will change according to the name of the Wikipedia page the template is used on.]

Two parameters

The first parameter will be the ID string used in the URL at Google Scholar. The second parameter will be used at the link text.

URL:

https://scholar.google.com/citations?user=EeTd0CYAAAAJ

Usage:

* {{Google Scholar id | EeTd0CYAAAAJ | Yoelle Maarek }}
* {{Google Scholar id | id= EeTd0CYAAAAJ | name= Yoelle Maarek }}

Output:

No parameters and Wikidata property not defined

Usage:

* {{Google Scholar id}}

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 Google Scholar id

This template generates an external link to a person's profile at Google Scholar.

Template parameters

ParameterDescriptionTypeStatus
IDid 1

The "id" parameter (or unnamed parameter "1") should contain the ID portion of the URL. Example: EeTd0CYAAAAJ is the ID portion of https://scholar.google.com/citations?user=EeTd0CYAAAAJ. This parameter is optional if Wikidata property P1960 exists, but required if not.

Default
Wikidata property P1960
Stringoptional
Namename 2

The "name" parameter (or unnamed parameter "2") may be used to specify the link text. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation.

Default
{{PAGENAMEBASE}}
Stringoptional

See also