Difference between revisions of "Template:Commons category"

From Nordic Larp Wiki
Jump to navigation Jump to search
m (1 revision imported)
en>Mike Peel
(tracking category fix for when _ is used rather than spaces)
Line 18: Line 18:
 
--><includeonly>{{#switch:{{NAMESPACE}}||{{ns:14}}=<!--
 
--><includeonly>{{#switch:{{NAMESPACE}}||{{ns:14}}=<!--
 
  Only add tracking categories to articles and categories.
 
  Only add tracking categories to articles and categories.
  -->{{#if:{{{1|}}}|{{#ifeq:Category:{{{1|}}}|{{#invoke:WikidataIB |getCommonsLink|qid={{{qid|}}}|onlycat=True}}|<!--
+
  -->{{#if:{{{1|}}}|{{#ifeq:Category:{{replace|{{{1|}}}|_|&#32;}}|{{#invoke:WikidataIB |getCommonsLink|qid={{{qid|}}}|onlycat=True}}|<!--
 
   -->[[Category:Commons category link is on Wikidata]]<!--
 
   -->[[Category:Commons category link is on Wikidata]]<!--
  
   -->|{{#ifeq:{{{1|}}}|{{PAGENAME}}|<!--
+
   -->|{{#ifeq:{{replace|{{{1|}}}|_|&#32;}}|{{PAGENAME}}|<!--
 
   ... the local parameter is the same as the local pagename, but not the same as on Wikidata
 
   ... the local parameter is the same as the local pagename, but not the same as on Wikidata
 
   -->[[Category:Commons category link is defined as the pagename]]<!--
 
   -->[[Category:Commons category link is defined as the pagename]]<!--

Revision as of 18:38, 1 January 2019

Template documentation[create]