Difference between revisions of "Template:About-distinguish"

From blackwiki
Jump to navigation Jump to search
blackwiki>Nihiltres
(Added Wikidata-based human/gender pronoun feature)
blackwiki>Nihiltres
(Updated from sandbox with Lua implementation)
Line 1: Line 1:
{{Hatnote|<!--
+
<includeonly>{{#invoke:About-distinguish|aboutDistinguish}}</includeonly><noinclude>{{Documentation}}</noinclude>
-->This {{namespace detect|main=article|category=category|other=page}} is about {{{1}}}. {{#ifeq:{{#property:P31}}|human|{{#switch:{{#property:P21}}
 
|transgender female
 
|female=She is
 
|transgender male
 
|male=He is
 
|intersex
 
|#default=They are
 
}}|It is}} not to be confused with [[:{{{2}}}]]<!--
 
-->{{#if:{{{3|}}} |<!--then:
 
    -->{{#if:{{{4|}}} |<!--then:-->, [[:{{{3}}}]]<!--
 
                    -->|<!--else:-->&nbsp;or [[:{{{3}}}]].}}<!--
 
              -->|<!--else:-->.<!--
 
-->}}<!--
 
-->{{#if:{{{4|}}} |<!--then:
 
    -->{{#if:{{{5|}}} |<!--then:-->, [[:{{{4}}}]]<!--
 
                    -->|<!--else:-->, or [[:{{{4}}}]].}}<!--
 
-->}}<!--
 
-->{{#if:{{{5|}}} |<!--then:-->, or [[:{{{5}}}]].}}<!--
 
-->}}<noinclude>
 
 
 
{{Documentation}}
 
 
 
</noinclude>
 

Revision as of 21:41, 13 May 2016

Template documentation[view] [edit] [history] [purge]

Template:Uses Wikidata

"This page is about … It is not to be confused with …"

{{About-distinguish}} is a template for noting other uses when there could be confusion with another topic.

  • {{about-distinguish|USE1|PAGE1}}Lua error in Module:About-distinguish at line 61: attempt to index field 'wikibase' (a nil value).
  • {{about-distinguish|USE1|PAGE1|PAGE2}}Lua error in Module:About-distinguish at line 61: attempt to index field 'wikibase' (a nil value).
  • {{about-distinguish|USE1|PAGE1{{!}}DISPLAY-TEXT|PAGE2#SECTION|PAGE3}}Lua error in Module:About-distinguish at line 61: attempt to index field 'wikibase' (a nil value).

For cases requiring custom text, use {{about-distinguish2}} instead:

If the page's Wikidata item has the property of being an instance of "human", then the template will try to replace "It" in "It is not to be confused with" with a more appropriate pronoun, based on the value of the "sex or gender" property of the item.