Difference between revisions of "Template:Is person"

From Crews Genealogy Wiki: focusing on the Wiregrass south, and related families
Jump to navigation Jump to search
(Created page with "{{#ifeq:{{{link|}}}|none|{{#if:{{{surname|}}}|<!--has surname-->[[Category:{{{surname|}}}]]|<!--doesn't have surname-->{{#if:{{{alt|}}}|<!--no surname and alt exists-->{{#if:{...")
 
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#ifeq:{{{link|}}}|none|{{#if:{{{surname|}}}|<!--has surname-->[[Category:{{{surname|}}}]]|<!--doesn't have surname-->{{#if:{{{alt|}}}|<!--no surname and alt exists-->{{#if:{{{first name|}}}|<!--no surname and alt exists with first name-->[[Category:{{{|last name|}}}]]|{{#if:{{#explode:{{{name}}}| |2}}|<!--show third word-->[[Category:{{#explode:{{{name}}}| |2}}]]|<!--has less than three words show the second word-->[[Category:{{#explode:{{{name|}}}| |1}}]] }}}}|<!--no surname and no alt-->{{#if:{{{first name|}}}|<!--no surname and alt exists with first name-->[[Category:{{{|last name|}}}]]|{{#if:{{#explode:{{{name}}}| |2}}|<!--show third word-->[[Category:{{#explode:{{{name}}}| |2}}]]|<!--has less than three words show the second word-->[[Category:{{#explode:{{{name|}}}| |1}}]] }} }} }} }}<!--set has person stuff-->{{#if:{{{name|}}}|{{#set:is person={{{name|}}} }}|{{#set:is person={{#if:{{{first name|}}}|{{{first name|}}}|<!--show nothing-->}}{{#if:{{{middle name|}}}|&ensp;{{{middle name|}}}|<!--show nothing-->}}{{#if:{{{last name|}}}|&ensp;{{{last name|}}}|<!--show nothing-->}}{{#if:{{{suffix|}}}|&ensp;{{{suffix|}}}|<!--show nothing-->}}{{#if: {{{id|}}}|&ensp;({{{id|}}})|<!--show nothing-->}} }} }}|{{#if:{{{name|}}}|<!--name given-->{{#if:{{{alt|}}}|<!--name and alt given-->[[{{{name|}}}{{#!:|}}{{{alt|}}}]]|<!--name but no alt-->[[{{{name|}}}]]}}|<!--no name given-->{{#if:{{{alt|}}}|<!--no name. with alt given-->[[{{#if:{{{first name|}}}|{{{first name|}}}|<!--show nothing-->}}{{#if:{{{middle name|}}}|&ensp;{{{middle name|}}}|<!--show nothing-->}}{{#if:{{{last name|}}}|&ensp;{{{last name|}}}|<!--show nothing-->}}{{#if:{{{suffix|}}}|&ensp;{{{suffix|}}}|<!--show nothing-->}}{{#if: {{{id|}}}|&ensp;({{{id|}}})|<!--show nothing-->}}{{#!:|}}{{{alt|}}}]]|<!--no name no alt-->[[{{#if:{{{first name|}}}|{{{first name|}}}|<!--show nothing-->}}{{#if:{{{middle name|}}}|&ensp;{{{middle name|}}}|<!--show nothing-->}}{{#if:{{{last name|}}}|&ensp;{{{last name|}}}|<!--show nothing-->}}{{#if:{{{suffix|}}}|&ensp;{{{suffix|}}}|<!--show nothing-->}}{{#if: {{{id|}}}|&ensp;({{{id|}}})|<!--show nothing-->}}]]}}}}{{#if:{{{surname|}}}|<!--has surname-->[[Category:{{{surname|}}}]]|<!--doesn't have surname-->{{#if:{{{alt|}}}|<!--no surname and alt exists-->{{#if:{{{first name|}}}|<!--no surname and alt exists with first name-->[[Category:{{{|last name|}}}]]|{{#if:{{#explode:{{{name}}}| |2}}|<!--show third word-->[[Category:{{#explode:{{{name}}}| |2}}]]|<!--has less than three words show the second word-->[[Category:{{#explode:{{{name|}}}| |1}}]] }} }}|<!--no surname and no alt-->{{#if:{{{first name|}}}|<!--no surname and alt exists with first name-->[[Category:{{{last name|}}}]]|{{#if:{{#explode:{{{name}}}| |2}}|<!--show third word-->[[Category:{{#explode:{{{name}}}| |2}}]]|<!--has less than three words show the second word-->[[Category:{{#explode:{{{name|}}}| |1}}]] }} }} }} }}{{#if:{{{name|}}}|{{#set:is person={{{name|}}} }}|{{#set:is person={{#if:{{{first name|}}}|{{{first name|}}}|<!--show nothing-->}}{{#if:{{{middle name|}}}|&ensp;{{{middle name|}}}|<!--show nothing-->}}{{#if:{{{last name|}}}|&ensp;{{{last name|}}}|<!--show nothing-->}}{{#if:{{{suffix|}}}|&ensp;{{{suffix|}}}|<!--show nothing-->}}{{#if: {{{id|}}}|&ensp;({{{id|}}})|<!--show nothing-->}} }} }}}}<noinclude>{{documentation}}</noinclude>
+
<includeonly><!--
 +
-->{{#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|}}}{{{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|}}} }} }}
 +
}}<!--assign to surname category and set surname-->{{#set: is person={{#var:full name}} }}[[Category:{{get surname|{{#var:full name}} }}]]</includeonly><noinclude>{{documentation}}</noinclude>

Latest revision as of 21:32, 18 December 2020