Difference between revisions of "Template:Has person"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
− | {{#vardefine:full name|{{#if:{{{first name|}}}{{{middle name|}}}{{{last name|}}}{{{suffix|}}}{{{id|}}}|{{{first name|}}} {{{middle name|}}} {{{last name|}}} {{{suffix|}}} {{{id|}}} | {{{name|}}} }} }}{{#switch: {{{link|}}} | + | {{#vardefine:full name|{{#if:{{{first name|}}}{{{middle name|}}}{{{last name|}}}{{{suffix|}}}{{{id|}}}|{{{first name|}}} {{{middle name|}}} {{{last name|}}} {{{suffix|}}} {{{id|}}} | {{{name|}}}{{{1|}}} }} }}{{#switch: {{{link|}}} |
|none={{#if: {{{alt|}}}|{{{alt|}}}|{{#var:full name}} }} | |none={{#if: {{{alt|}}}|{{{alt|}}}|{{#var:full name}} }} | ||
|#default = {{#if: {{{alt|}}}|[[{{#var:full name}}|{{{alt|}}}]]|[[{{#var:full name}}]]}} | |#default = {{#if: {{{alt|}}}|[[{{#var:full name}}|{{{alt|}}}]]|[[{{#var:full name}}]]}} | ||
}}<!--assign to surname categoy and set surname-->{{#set: has person={{#var:full name}} }}[[Category:{{get surname|{{#var:full name}} }}]]<noinclude>{{documentation}}</noinclude> | }}<!--assign to surname categoy and set surname-->{{#set: has person={{#var:full name}} }}[[Category:{{get surname|{{#var:full name}} }}]]<noinclude>{{documentation}}</noinclude> |
Revision as of 17:05, 16 March 2019
[[]][[Category:]]
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