Difference between revisions of "Template:Has person"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
{{#if:{{{first name|}}}|{{#if: {{{last name|}}}|{{#if:{{{alt|}}}|[[has person::{{{first name|}}} {{#if:{{{middle name|}}}|{{{middle name|}}} |}} {{{last name|}}}{{#!:|}}{{{alt|}}}]]|[[has person::{{{first name|}}}{{#if:{{{middle name|}}}|{{{middle name|}}} |}} {{{last name|}}}]]{{#set: has surname={{{last name|}}} }} |first and last name must be provided}}|{{#if:{{{alt|}}}|[[has person::{{{name|}}}{{#!:|}}{{{alt|}}}]]|[[has person::{{{name|}}}]]}}{{#set:has surname={{#if:{{#explode:{{{name|}}}| |2}}|{{#explode:{{{name|}}}| |2}}|{{#explode:{{{name|}}}| |1}}}}}}{{#if: {{{surname|}}}|[[Category:{{{surname|}}}]]|[[Category:{{#if:{{#explode:{{{name|}}}| |2}}|{{#explode:{{{name|}}}| |2}}|{{#explode:{{{name|}}}| |1}}}}]] }} }} }}<noinclude>{{documentation}}</noinclude> | {{#if:{{{first name|}}}|{{#if: {{{last name|}}}|{{#if:{{{alt|}}}|[[has person::{{{first name|}}} {{#if:{{{middle name|}}}|{{{middle name|}}} |}} {{{last name|}}}{{#!:|}}{{{alt|}}}]]|[[has person::{{{first name|}}}{{#if:{{{middle name|}}}|{{{middle name|}}} |}} {{{last name|}}}]]{{#set: has surname={{{last name|}}} }} |first and last name must be provided}}|{{#if:{{{alt|}}}|[[has person::{{{name|}}}{{#!:|}}{{{alt|}}}]]|[[has person::{{{name|}}}]]}}{{#set:has surname={{#if:{{#explode:{{{name|}}}| |2}}|{{#explode:{{{name|}}}| |2}}|{{#explode:{{{name|}}}| |1}}}}}}{{#if: {{{surname|}}}|[[Category:{{{surname|}}}]]|[[Category:{{#if:{{#explode:{{{name|}}}| |2}}|{{#explode:{{{name|}}}| |2}}|{{#explode:{{{name|}}}| |1}}}}]] }} }} }}<noinclude>{{documentation}}</noinclude> | ||
− | + | [[{{#if:{{{first name|}}}|{{{first name|}}}|<!--show nothing-->}}{{#if:{{{middle name|}}}| {{{middle name|}}}|<!--show nothing-->}}{{#if:{{{last name|}}}| {{{last name|}}}|<!--show nothing-->}}{{#if:{{{suffix|}}}| {{{suffix|}}}|<!--show nothing-->}}{{#if: {{{id|}}}| ({{{id|}}})|<!--show nothing-->}}]] | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | {{#if: {{{first name|}}}|{{{first name|}}}|<!-show nothing->}}{{#if: {{{middle name|}}}|& | ||
− | + | {{#if:{{{name|}}}|<!-if name exists--> {{#if:{{{alt|}}}|<!-if name and alt exists-->|<!-name but no alt-->}}| <!-if name and alt doesn't exist-->}} | |
− | |||
− | |||
− | |||
− | |||
− | {{ | ||
− | < | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 09:01, 25 January 2019
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
Templates Used
[[]]
<!-if name and alt doesn't exist-->