Template:Commons category: Difference between revisions

From BitProjects
Jump to navigation Jump to search
Sources>Nixeagle
Remove link to Wikipedia commons. The point of this template is to get people to the gallaries, not to the commons main page. We want that second link to have more chances to get clicked on.
m 152 revisions imported
 
(55 intermediate revisions by 21 users not shown)
Line 1: Line 1:
<div class="infobox sisterproject">[[Image:Commons-logo.svg|left|50px]]
{{Sister project
<div style="margin-left: 60px;">Wikimedia Commons has media related to:
| position = {{{position|}}}
<div style="margin-left: 10px;"> '''''[[Commons:Category:{{{1|{{PAGENAME}}}}}|{{{2|{{{1|{{PAGENAME}}}}}}}}]]'''''</div>
| project  = commons
</div></div><noinclude>{{clear}}
| text    = Wikimedia Commons has {{{alt-term|media related to}}} <span style="font-weight: bold; {{#ifeq:{{{nowrap|no}}}|yes|white-space:nowrap;}} {{#ifeq:{{{italic|yes}}}|yes|font-style: italic;}}">[[commons:{{#if:{{{1|}}}|Category:{{{1|}}}|{{if then show|{{#invoke:WikidataIB |getCommonsLink|qid={{{qid|}}}|onlycat=True|fallback=False}}|Category:{{PAGENAME}}}}}}|{{#ifeq:{{{lcf|{{{lcfirst|no}}}}}}|yes|{{lcfirst:{{{2|{{#if:{{{1|}}} | {{{1|}}} <!--
{{protected template}}
  -->|{{if then show|{{#invoke:String|replace|{{#invoke:WikidataIB |getCommonsLink|qid={{{qid|}}}|onlycat=True|fallback=False}}|Category:|}}<!--
[[Category:Interwiki link templates|Commonscat]]
  --> |{{PAGENAME}} }} }} }}} }}<!--
[[Category:Interwiki category linking templates|Commonscat]]
  -->|{{{2|{{#if:{{{1|}}} | {{{1|}}} <!--
  -->|{{if then show|{{#invoke:String|replace|{{#invoke:WikidataIB |getCommonsLink|qid={{{qid|}}}|onlycat=True|fallback=False}}|Category:|}}|{{PAGENAME}} }}<!--
  -->}}}}}}}]]</span>.<!--
End of the template code, now add relevant tracking categories


[[af:Sjabloon:CommonsKategorie]]
--><includeonly>{{#switch:{{NAMESPACE}}||{{ns:14}}=<!--
[[az:Şablon:CommonsKat]]
Only add tracking categories to articles and categories.
[[bg:Шаблон:Commonscat]]
-->{{#if:{{{1|}}}|{{#ifeq:Category:{{replace|{{{1|}}}|_|&#32;}}|{{#invoke:WikidataIB |getCommonsLink|qid={{{qid|}}}|onlycat=True|fallback=False}}|<!--
[[ca:Plantilla:Commonscat]]
  -->[[Category:Commons category link is on Wikidata]]<!--
[[cs:Šablona:Commonscat]]
 
[[da:Skabelon:Commonscat]]
  -->|{{#ifeq:{{replace|{{{1|}}}|_|&#32;}}|{{PAGENAME}}|<!--
[[de:Vorlage:Commonscat]]
  ... the local parameter is the same as the local pagename
[[es:Plantilla:Commonscat]]
  -->[[Category:Commons category link is defined as the pagename]]{{preview warning|Commons category does not match the Commons sitelink on Wikidata – [[Template:Commons_category#Resolving_discrepancies|please check]]}}<!--
[[eo:Ŝablono:Commonscat]]
 
[[eu:Txantiloi:Commonskat]]
  ... the local parameter is not the pagename
[[fr:Modèle:CommonsCat]]
  -->|[[Category:Commons category link is locally defined]]{{preview warning|Commons category does not match the Commons sitelink on Wikidata – [[Template:Commons_category#Resolving_discrepancies|please check]]}}}} }}<!--
[[ko:틀:Commonscat]]
 
[[hr:Predložak:Commonscat]]
  We don't have a locally-defined link
[[io:Template:Commonscat]]
  -->|{{#if:{{#invoke:WikidataIB |getCommonsLink|qid={{{qid|}}}|onlycat=True|fallback=False}}|<!--
[[id:Templat:Commonscat]]
 
[[ia:Patrono:Commonscat]]
  ... so we're using Wikidata
[[os:Шаблон:Commonscat]]
  -->[[Category:Commons category link from Wikidata]]<!--
[[is:Snið:Commonscat]]
 
[[lv:Veidne:Commonscat]]
    <!-- ... or we're using the pagename
[[lt:Šablonas:Commonscat]]
    -->|[[Category:Commons category link is the pagename]]{{preview warning|Commons category does not match the Commons sitelink on Wikidata – [[Template:Commons_category#Resolving_discrepancies|please check]]}}
[[hu:Sablon:Közvagyonkat]]
  }}
[[mk:Шаблон:Ризница-врска]]
  }}
[[ms:Templat:Commonscat]]
  }}</includeonly>
[[nl:Sjabloon:Commonscat]]
}}<noinclude>
[[no:Mal:Commonscat]]
{{Documentation}}
[[ja:Template:Commonscat]]
<!-- Add categories to the /doc subpage, not here! -->
[[oc:Modèl:Commonscat]]
[[pl:Szablon:Commonscat]]
[[pt:Predefinição:Commonscat]]
[[ro:Format:Commonscat]]
[[ru:Шаблон:Commonscat]]
[[simple:Template:Commonscat]]
[[sk:Šablóna:Commonscat]]
[[sl:Predloga:Kategorija v Zbirki]]
[[sr:Шаблон:Commonscat]]
[[sh:Template:Commonscat]]
[[su:Citakan:Commonscat]]
[[fi:Malline:Commonscat]]
[[sv:Mall:Commonscat]]
[[th:แม่แบบ:Commonscat]]
[[vi:Tiêu bản:Commonscat]]
[[tr:Şablon:CommonsKat]]
[[uk:Шаблон:Commonscat]]
[[zh:Template:Commonscat]]
</noinclude>
</noinclude>

Latest revision as of 14:28, 27 September 2025

<templatestyles src="Module:Side box/styles.css"></templatestyles><templatestyles src="Sister project/styles.css"></templatestyles>

Template:Documentation