Difference between revisions of "Template:MathGenealogy/sandbox"
Jump to navigation
Jump to search
imported>Zyxw (copy of existing template) |
imported>Zyxw (Trim leading or trailing spaces in unnamed parameter 2. Add fix for empty "name" or "title" parameter. Display error message if template missing ID and not present in Wikidata.) |
||
| Line 1: | Line 1: | ||
| − | <includeonly>[https://mathgenealogy.org/id.php?id={{ | + | {{#if: {{{1<includeonly>|</includeonly>}}} {{{id|}}} {{#property:P549}} |
| − | {{ | + | |
| + | | [https://mathgenealogy.org/id.php?id={{#if: {{{1|{{{id<includeonly>|</includeonly>}}}}}} | {{{1|{{{id}}}}}} | {{First word|1={{#property:P549}}|sep=,}} }} {{#if: {{{2|{{{title|{{{name<includeonly>|</includeonly>}}}}}}}}} | {{{2|{{{title|{{{name}}}}}}}}} | {{PAGENAMEBASE}} }}] at the [[Mathematics Genealogy Project]]<includeonly>{{EditAtWikidata|pid=P549|{{{1|{{{id|}}}}}}}}</includeonly> | ||
| + | |||
| + | | <span class="error">{{[[Template:MathGenealogy|MathGenealogy]]}} template missing ID and not present in Wikidata.</span> | ||
| + | |||
| + | }}<noinclude> | ||
| + | {{Documentation}} | ||
| + | <!-- Add categories and interwikis to the /doc subpage, not here! --> | ||
| + | </noinclude> | ||
Latest revision as of 00:23, 16 October 2020
{{{name}}} at the Mathematics Genealogy Project
| This is the template sandbox page for Template:MathGenealogy (diff). See also the companion subpage for test cases. |
| This template uses Lua: |
Contents
Usage
If the 'name' or 'title' parameter is not supplied, the name shown for the person will be that of the Wikipedia page where the template is included.
- Unnamed parameters
{{MathGenealogy | ID }}{{MathGenealogy | ID | NAME }}
- Named parameters
{{MathGenealogy | id= ID }}{{MathGenealogy | id= ID | name= NAME }}{{MathGenealogy | id= ID | title= NAME }}
- Using Wikidata property Template:Property
{{MathGenealogy}}{{MathGenealogy | name= NAME }}{{MathGenealogy | title= NAME }}
Examples
Unnamed parameters
- Usage
* {{MathGenealogy | 25274 | Sheila Adele Greibach }}
- Output
-
- Sheila Adele Greibach at the Mathematics Genealogy ProjectScript error: No such module "EditAtWikidata".
Named parameters
- Usage
* {{MathGenealogy | id= 38586 | name= Leonhard Euler }}* {{MathGenealogy | id= 38586 | title= Leonhard Euler }}
- Output
-
- Leonhard Euler at the Mathematics Genealogy ProjectScript error: No such module "EditAtWikidata".
- Leonhard Euler at the Mathematics Genealogy ProjectScript error: No such module "EditAtWikidata".
No parameters and Wikidata property not defined
- Usage
* {{MathGenealogy}}
- Output
-
- Template:PAGENAMEBASE at the Mathematics Genealogy ProjectScript error: No such module "EditAtWikidata".
TemplateData
Mathematics Genealogy Project link
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| id | id 1 | Mathematics Genealogy Project id | Number | optional |
| title | title name 2 | optional display title | String | optional |
| The above documentation is transcluded from Template:MathGenealogy/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. Please add categories to the /doc subpage. Subpages of this template. |