Changes
nocat
{| class="toccolours" style="margin:1em auto;"
| style="text-align:center;" | <div>'''[[Wikipedia:Classification|Classification]]:''' [[:Category:People|People]]: [[:Category:People by occupation|By occupation]]: <!--
# Now test for Supercategory
-->{{#if:{{{Supercategory|}}}|[[:Category:{{{Supercategory}}}|{{ucfirst:{{{Supercategory}}}}}]]}}<!--
# End of supercategory
#
# Now test for Supercategory2
-->{{#if:{{{Supercategory2|}}}|<!--
# Supercategory2 is set, so display a link to it
#... but first, if Supercategory also exists, we need a slash
-->{{#if:{{{Supercategory|}}} | / }}<!---
Slash done, so display a link to Supercategory2
--> [[:Category:{{{Supercategory2}}}|{{ucfirst:{{{Supercategory2}}}}}]]<!--
--> }}<!--
# End of supercategory2
--><!--
# Now, if either Supercategory or Supercategory2 has been output, we need a colon
-->{{#switch: 1
| {{#if:{{{Supercategory|}}} | {{#ifexist: Category:{{ucfirst:{{{Supercategory}}}}} | 1 }} }}
| {{#if:{{{Supercategory2|}}} | {{#ifexist: Category:{{ucfirst:{{{Supercategory2}}}}} | 1 }} }} = {{COLON}}
}}<!---
# Colon done, if needed
--> [[:Category:{{{Profession}}}|{{ucfirst:{{{Profession}}}}}]]{{#ifexist:Category:{{{Profession}}} by nationality|{{COLON}} [[:Category:{{{Profession}}} by nationality|By nationality]]|}}: {{#if: {{{ParentNationality|}}} | [[:Category:{{{ParentNationality|}}} {{lcfirst:{{{Profession}}}}}{{!}}{{{ParentNationality|}}}]]: }} '''{{{Nationality}}}'''<br />
''Also:'' {{#if: {{{ParentCountry|}}} | [[:Category:{{{ParentCountry|}}}{{!}}{{{ParentCountry|}}}]]:}} [[:Category:{{{Country}}}|{{{Country}}}]]: [[:Category:{{{Nationality}}} people|People]]: [[:Category:{{{Nationality}}} people by occupation|By occupation]]: {{#if:{{{Supercategory|}}} |<!--
#Supercategory parameter was supplied
--> {{#ifexist: Category:{{{Nationality}}} {{lcfirst:{{{Supercategory}}}}} |<!--
# [[Category:Nationality supercategory]] exists, so display a link to it
--> [[:Category:{{{Nationality}}} {{lcfirst:{{{Supercategory}}}}}|{{ucfirst:{{{Supercategory|}}}}}]]|<!--
# [[Category:Nationality supercategory]] does NOT exist, so do nothing
--> }} <!--
#Supercategory parameter was NOT supplied, so do nothing
--> |}} <!--
--> {{#if:{{{Supercategory2|}}} |<!--
#Supercategory2 parameter was supplied
--> {{#ifexist: Category:{{{Nationality}}} {{lcfirst:{{{Supercategory2}}}}} |<!--
# [[Category:Nationality supercategory2]] exists, so display a link to it
... but first, if Supercategory exists, we need a slash
-->{{#if:{{{Supercategory|}}} | {{#ifexist: Category:{{{Nationality}}} {{lcfirst:{{{Supercategory}}}}} | / }}}}<!---
Slash done, so display a link to Supercategory2
--> [[:Category:{{{Nationality}}} {{lcfirst:{{{Supercategory2}}}}}|{{ucfirst:{{{Supercategory2|}}}}}]] |<!--
# [[Category:Nationality supercategory2]] does NOT exist, so do nothing
--> }} <!--
#Supercategory2 parameter was NOT supplied, so do nothing
--> |}}<!--
# Now, if either Supercategory or Supercategory2 has been output, we need a colon
-->{{#switch: 1
| {{#if:{{{Supercategory|}}} | {{#ifexist: Category:{{{Nationality}}} {{lcfirst:{{{Supercategory}}}}} | 1 }} }}
| {{#if:{{{Supercategory2|}}} | {{#ifexist: Category:{{{Nationality}}} {{lcfirst:{{{Supercategory2}}}}} | 1 }} }} = {{COLON}}
}}<!---
# Colon done (if needed), so next field
-->''' {{ucfirst:{{{Profession}}}}}'''</div>
|}
<includeonly><!--
#Categories -->{{#if: {{{nocat|}}} ||<!--
# Add to both "Cat:Nationality supercategory" (if it exists) AND "Cat:Nationality supercategory2" (if it exists) ..
# otherwise add to "Cat:Nationality people by occupation"
#
# First see if a Supercategory parameter was supplied
-->{{#if:{{{Supercategory|}}}|<!--
# We have a Supercategory parameter.
# Now test whether Cat:Nationality supercategory exists
--> {{#ifexist: Category:{{{Nationality}}} {{lcfirst:{{{Supercategory}}}}}<!--
# We have a Cat:Nationality supercategory
--> | [[Category:{{{Nationality}}} {{lcfirst:{{{Supercategory}}}}}|{{{Profession}}}]]
}}<!--
# There is no {{{Supercategory}} parameter
--> }}<!--
#
# Now see if a Supercategory2 parameter was supplied
-->{{#if:{{{Supercategory2|}}}|<!--
# We have a Supercategory2 parameter.
# Now test whether Cat:Nationality supercategory2 exists
--> {{#ifexist: Category:{{{Nationality}}} {{lcfirst:{{{Supercategory2}}}}}<!--
# We have a Cat:Nationality supercategory2
--> | [[Category:{{{Nationality}}} {{lcfirst:{{{Supercategory2}}}}}|{{{Profession}}}]]
}}<!--
# There is no {{{Supercategory2}} parameter
--> }}<!--
#
# Now, unless either Supercategory or Supercategory2 has been supplied and exists, we use Cat:Nationality people by occupation
-->{{#if: {{#if:{{{Supercategory|}}} | {{#ifexist: Category:{{{Nationality}}} {{lcfirst:{{{Supercategory}}}}} |superexists|}}|}} {{#if:{{{Supercategory2|}}} | {{#ifexist: Category:{{{Nationality}}} {{lcfirst:{{{Supercategory2}}}}}|supe2rexists|}}|}} | |[[Category:{{{Nationality}}} people by occupation|{{{Profession}}}]]}}<!--
# Add to "Cat:{{{Profession}}} by nationality" (if it exists), otherwise to "Cat:{{{Profession}}}"
# First test for existence of "Cat:{{{Profession}}} by nationality"
-->{{#ifexist:Category:{{{Profession}}} by nationality <!--
# "Cat:{{{Profession}}} by nationality" exists
--> |[[Category:{{{Profession}}} by nationality|{{{Nationality}}}]]<!--
# No "Cat:{{{Profession}}} by nationality", so test for existence of "Cat:{{{Profession}}}"
--> | {{#ifexist:Category:{{{Profession}}} <!--
# "Cat:{{{Profession}}}" exists, so output it
--> |[[Category:{{{Profession}}}|{{{Nationality}}}]]<!--
# No "Cat:{{{Profession}}}", so do nothing
-->|}}
}}<!--
# If there is a ParentNationality, add [[Category:ParentNationality Profession]]
# ... but comment it out for now
{{#if: {{{ParentNationality|}}} | [[Category:{{{ParentNationality|}}} {{lcfirst:{{{Profession|}}}}}{{!}} {{{Nationality|}}}]] }}
-->}}</includeonly><noinclude>
{{Documentation}}
</noinclude>
| style="text-align:center;" | <div>'''[[Wikipedia:Classification|Classification]]:''' [[:Category:People|People]]: [[:Category:People by occupation|By occupation]]: <!--
# Now test for Supercategory
-->{{#if:{{{Supercategory|}}}|[[:Category:{{{Supercategory}}}|{{ucfirst:{{{Supercategory}}}}}]]}}<!--
# End of supercategory
#
# Now test for Supercategory2
-->{{#if:{{{Supercategory2|}}}|<!--
# Supercategory2 is set, so display a link to it
#... but first, if Supercategory also exists, we need a slash
-->{{#if:{{{Supercategory|}}} | / }}<!---
Slash done, so display a link to Supercategory2
--> [[:Category:{{{Supercategory2}}}|{{ucfirst:{{{Supercategory2}}}}}]]<!--
--> }}<!--
# End of supercategory2
--><!--
# Now, if either Supercategory or Supercategory2 has been output, we need a colon
-->{{#switch: 1
| {{#if:{{{Supercategory|}}} | {{#ifexist: Category:{{ucfirst:{{{Supercategory}}}}} | 1 }} }}
| {{#if:{{{Supercategory2|}}} | {{#ifexist: Category:{{ucfirst:{{{Supercategory2}}}}} | 1 }} }} = {{COLON}}
}}<!---
# Colon done, if needed
--> [[:Category:{{{Profession}}}|{{ucfirst:{{{Profession}}}}}]]{{#ifexist:Category:{{{Profession}}} by nationality|{{COLON}} [[:Category:{{{Profession}}} by nationality|By nationality]]|}}: {{#if: {{{ParentNationality|}}} | [[:Category:{{{ParentNationality|}}} {{lcfirst:{{{Profession}}}}}{{!}}{{{ParentNationality|}}}]]: }} '''{{{Nationality}}}'''<br />
''Also:'' {{#if: {{{ParentCountry|}}} | [[:Category:{{{ParentCountry|}}}{{!}}{{{ParentCountry|}}}]]:}} [[:Category:{{{Country}}}|{{{Country}}}]]: [[:Category:{{{Nationality}}} people|People]]: [[:Category:{{{Nationality}}} people by occupation|By occupation]]: {{#if:{{{Supercategory|}}} |<!--
#Supercategory parameter was supplied
--> {{#ifexist: Category:{{{Nationality}}} {{lcfirst:{{{Supercategory}}}}} |<!--
# [[Category:Nationality supercategory]] exists, so display a link to it
--> [[:Category:{{{Nationality}}} {{lcfirst:{{{Supercategory}}}}}|{{ucfirst:{{{Supercategory|}}}}}]]|<!--
# [[Category:Nationality supercategory]] does NOT exist, so do nothing
--> }} <!--
#Supercategory parameter was NOT supplied, so do nothing
--> |}} <!--
--> {{#if:{{{Supercategory2|}}} |<!--
#Supercategory2 parameter was supplied
--> {{#ifexist: Category:{{{Nationality}}} {{lcfirst:{{{Supercategory2}}}}} |<!--
# [[Category:Nationality supercategory2]] exists, so display a link to it
... but first, if Supercategory exists, we need a slash
-->{{#if:{{{Supercategory|}}} | {{#ifexist: Category:{{{Nationality}}} {{lcfirst:{{{Supercategory}}}}} | / }}}}<!---
Slash done, so display a link to Supercategory2
--> [[:Category:{{{Nationality}}} {{lcfirst:{{{Supercategory2}}}}}|{{ucfirst:{{{Supercategory2|}}}}}]] |<!--
# [[Category:Nationality supercategory2]] does NOT exist, so do nothing
--> }} <!--
#Supercategory2 parameter was NOT supplied, so do nothing
--> |}}<!--
# Now, if either Supercategory or Supercategory2 has been output, we need a colon
-->{{#switch: 1
| {{#if:{{{Supercategory|}}} | {{#ifexist: Category:{{{Nationality}}} {{lcfirst:{{{Supercategory}}}}} | 1 }} }}
| {{#if:{{{Supercategory2|}}} | {{#ifexist: Category:{{{Nationality}}} {{lcfirst:{{{Supercategory2}}}}} | 1 }} }} = {{COLON}}
}}<!---
# Colon done (if needed), so next field
-->''' {{ucfirst:{{{Profession}}}}}'''</div>
|}
<includeonly><!--
#Categories -->{{#if: {{{nocat|}}} ||<!--
# Add to both "Cat:Nationality supercategory" (if it exists) AND "Cat:Nationality supercategory2" (if it exists) ..
# otherwise add to "Cat:Nationality people by occupation"
#
# First see if a Supercategory parameter was supplied
-->{{#if:{{{Supercategory|}}}|<!--
# We have a Supercategory parameter.
# Now test whether Cat:Nationality supercategory exists
--> {{#ifexist: Category:{{{Nationality}}} {{lcfirst:{{{Supercategory}}}}}<!--
# We have a Cat:Nationality supercategory
--> | [[Category:{{{Nationality}}} {{lcfirst:{{{Supercategory}}}}}|{{{Profession}}}]]
}}<!--
# There is no {{{Supercategory}} parameter
--> }}<!--
#
# Now see if a Supercategory2 parameter was supplied
-->{{#if:{{{Supercategory2|}}}|<!--
# We have a Supercategory2 parameter.
# Now test whether Cat:Nationality supercategory2 exists
--> {{#ifexist: Category:{{{Nationality}}} {{lcfirst:{{{Supercategory2}}}}}<!--
# We have a Cat:Nationality supercategory2
--> | [[Category:{{{Nationality}}} {{lcfirst:{{{Supercategory2}}}}}|{{{Profession}}}]]
}}<!--
# There is no {{{Supercategory2}} parameter
--> }}<!--
#
# Now, unless either Supercategory or Supercategory2 has been supplied and exists, we use Cat:Nationality people by occupation
-->{{#if: {{#if:{{{Supercategory|}}} | {{#ifexist: Category:{{{Nationality}}} {{lcfirst:{{{Supercategory}}}}} |superexists|}}|}} {{#if:{{{Supercategory2|}}} | {{#ifexist: Category:{{{Nationality}}} {{lcfirst:{{{Supercategory2}}}}}|supe2rexists|}}|}} | |[[Category:{{{Nationality}}} people by occupation|{{{Profession}}}]]}}<!--
# Add to "Cat:{{{Profession}}} by nationality" (if it exists), otherwise to "Cat:{{{Profession}}}"
# First test for existence of "Cat:{{{Profession}}} by nationality"
-->{{#ifexist:Category:{{{Profession}}} by nationality <!--
# "Cat:{{{Profession}}} by nationality" exists
--> |[[Category:{{{Profession}}} by nationality|{{{Nationality}}}]]<!--
# No "Cat:{{{Profession}}} by nationality", so test for existence of "Cat:{{{Profession}}}"
--> | {{#ifexist:Category:{{{Profession}}} <!--
# "Cat:{{{Profession}}}" exists, so output it
--> |[[Category:{{{Profession}}}|{{{Nationality}}}]]<!--
# No "Cat:{{{Profession}}}", so do nothing
-->|}}
}}<!--
# If there is a ParentNationality, add [[Category:ParentNationality Profession]]
# ... but comment it out for now
{{#if: {{{ParentNationality|}}} | [[Category:{{{ParentNationality|}}} {{lcfirst:{{{Profession|}}}}}{{!}} {{{Nationality|}}}]] }}
-->}}</includeonly><noinclude>
{{Documentation}}
</noinclude>