Template:Commons category: Difference between revisions

Changing tracking category logic so that we only use the P373 cases where we have actually fallen back to P373, rather than using the local text. No change to the display of the category links.
(Adding lcfirst and nowrap display options)
(Changing tracking category logic so that we only use the P373 cases where we have actually fallen back to P373, rather than using the local text. No change to the display of the category links.)
Line 21:
--><includeonly>{{#switch:{{NAMESPACE}}||{{ns:14}}=<!--
Only add tracking categories to articles and categories.
-->{{#if:{{{1|}}}|{{#ifeq:Category:{{replace|{{{1|}}}|_|&#32;}}|{{#invoke:WikidataIB |getCommonsLink|qid={{{qid|}}}|onlycat=True|fallback=False}}|<!--
-->[[Category:Commons category link is on Wikidata]]<!--
 
Line 32:
 
We don't have a locally-defined link
-->|{{#if:{{#invoke:WikidataIB |getCommonsLink|qid={{{qid|}}}|onlycat=True|fallback=False}}|<!--
 
... so we're using Wikidata
-->[[Category:Commons category link from Wikidata]]<!--
 
<!-- ... or we've fallen back tore theusing pagenameP373
-->|{{#ifeq:{{#invoke:WikidataIB |getCommonsLink |qid={{{qid|}}}|onlycat=True|fallback=True}}|{{#invoke:WikidataIB |getCommonsLink |qid={{{qid|}}}|onlycat=True|fallback=False}}||[[Category:Commons category link is on Wikidata using P373]]}} }}</includeonly><noinclude>!--
-->|[[Category:Commons category link is the pagename]]}}
}}<!-- Check for P373 use
... or we've fallen back to the pagename
-->{{#ifeq:{{#invoke:WikidataIB |getCommonsLink |qid={{{qid|}}}|onlycat=True|fallback=True}}|{{#invoke:WikidataIB |getCommonsLink |qid={{{qid|}}}|onlycat=True|fallback=False}}||[[Category:Commons category link is on Wikidata using P373]]}} }}</includeonly><noinclude>
-->|[[Category:Commons category link is the pagename]]}}
}}
}}
}}</includeonly><noinclude>
{{Documentation}}
<!-- Add categories to the /doc subpage, not here! -->
Anonymous user