Difference between revisions of "Template:Has person"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
− | {{#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:{{{name|}}}|<!--name given-->{{#set:has person={{{name|}}}{{#if:{{{alt|}}}|<!--name and alt given-->[[{{{name|}}}{{#!:|}}{{{alt|}}}]]|<!--name but no alt-->[[{{{name|}}}]]}}|<!--no name given-->{{#set:has person={{#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|}}})}}{{#if:{{{alt|}}}|<!--no name. with alt given--> |
[[{{#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-->}}{{#!:|}}{{{alt|}}}]]|<!--no name no alt-->[[{{#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|}}}| {{{middle name|}}}|<!--show nothing-->}}{{#if:{{{last name|}}}| {{{last name|}}}|<!--show nothing-->}}{{#if:{{{suffix|}}}| {{{suffix|}}}|<!--show nothing-->}}{{#if: {{{id|}}}| ({{{id|}}})|<!--show nothing-->}}{{#!:|}}{{{alt|}}}]]|<!--no name no alt-->[[{{#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:{{{surname|}}}|<!--has surname-->[[Category:{{{surname|}}}]]|<!--doesn't have surname-->{{#if:{{{alt|}}}|<!--no surname and alt exists-->{{#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:{{#explode:{{{name}}}| |2}}|<!--show third word-->[[Category:{{#explode:{{{name}}}| |2}}]]|<!--has less than three words show the second word-->[[Category:{{#explode:{{{name|}}}| |1}}]] }} }} }} | {{#if:{{{surname|}}}|<!--has surname-->[[Category:{{{surname|}}}]]|<!--doesn't have surname-->{{#if:{{{alt|}}}|<!--no surname and alt exists-->{{#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:{{#explode:{{{name}}}| |2}}|<!--show third word-->[[Category:{{#explode:{{{name}}}| |2}}]]|<!--has less than three words show the second word-->[[Category:{{#explode:{{{name|}}}| |1}}]] }} }} }} |
Revision as of 21:05, 25 January 2019
{{#if:|{{#set:has person=[[]]|The wikipage input value is empty (e.g. <code>, [[]]</code>) and therefore it cannot be used as a name or as part of a query condition. [[Category:]]