Difference between revisions of "Template:Has person"
Jump to navigation
Jump to search
Line 2: | Line 2: | ||
-->{{#vardefine:full name|{{#if:{{{first name|}}}{{{middle name|}}}{{{last name|}}}{{{suffix|}}}{{{id|}}}|{{{first name|}}} {{{middle name|}}} {{{last name|}}} {{{suffix|}}} {{{id|}}} | {{{name|}}}{{{1|}}} }} }}<!-- | -->{{#vardefine:full name|{{#if:{{{first name|}}}{{{middle name|}}}{{{last name|}}}{{{suffix|}}}{{{id|}}}|{{{first name|}}} {{{middle name|}}} {{{last name|}}} {{{suffix|}}} {{{id|}}} | {{{name|}}}{{{1|}}} }} }}<!-- | ||
-->{{#switch: {{{link|}}} | -->{{#switch: {{{link|}}} | ||
− | |none={{#if: {{{alt|}}}{{{2|}}}|{{{alt|}}}{{{2|}}}|{{#var:full name}} }} | + | |none={{#if: {{{alt|}}}{{{2|}}}|{{{alt|}}}{{{2|}}}|{{Split name |name={{#var:full name}} |gen={{{gen|}}} }} }} |
|#default = {{#if: {{{alt|}}}{{{2|}}}|[[{{#var:full name}}|{{{alt|}}}{{{2|}}}]]|{{Split name |name={{#var:full name}} |gen={{{gen|}}} }} }} | |#default = {{#if: {{{alt|}}}{{{2|}}}|[[{{#var:full name}}|{{{alt|}}}{{{2|}}}]]|{{Split name |name={{#var:full name}} |gen={{{gen|}}} }} }} | ||
}}<!--assign to surname category and set surname-->{{#set: has person={{#var:full name}} }}[[Category:{{get surname|{{#var:full name}} }}]]</includeonly><noinclude>{{documentation}}</noinclude> | }}<!--assign to surname category and set surname-->{{#set: has person={{#var:full name}} }}[[Category:{{get surname|{{#var:full name}} }}]]</includeonly><noinclude>{{documentation}}</noinclude> |
Latest revision as of 21:32, 18 December 2020
The purpose of this template is to add a has person::name semantic property. It will split first and last names, and add a
has surnamesemantic property.
Usage
{{has person |name={{{name}}} |alt={{{alt}}} }}
- name = the full name of the individual i.e. john smith.
- alt = alternate text to be displayed. i.e. john rather than john smith. (good for transcriptions)
- first
- middle
- last
- id
- link
- surname
- gen