Template:Commons category: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Mike Peel
(tweak tracking category logic)
meta>Mike Peel
(Call sister project directly rather than going through commons)
Line 1: Line 1:
{{Commons
{{Sister project
| position = {{{position|}}}
| position = {{{position|}}}
<!-- Link -->
| project  = commons
| 1 = <!--
| text    = Wikimedia Commons has {{{alt-term|media related to}}} '''''[[commons:{{#if:{{{1|}}}|Category:{{{1|}}}|{{if then show|{{#invoke:WikidataIB |getCommonsLink|qid={{{qid|}}}|onlycat=True}}|Category:{{PAGENAME}}}}}}|<span style="{{#ifeq:{{{nowrap|no}}}|yes|white-space:nowrap;}} {{#ifeq:{{{italic|no}}}|yes|font-style: italic; }}">{{#ifeq:{{{lcf|{{{lcfirst|no}}}}}}|yes|{{lcfirst:{{{2|{{#if:{{{1|}}} | {{{1|}}} <!--
Check for a locally-specified category
-->{{#if:{{{1|}}} | Category:{{{1|}}} <!--
  ... or use Wikidata
  -->|{{if then show|{{#invoke:WikidataIB |getCommonsLink|qid={{{qid|}}}|onlycat=True}}<!--
  ... or fall back to the page name
  --> |Category:{{PAGENAME}} }} }}
<!-- Display title -->
| 2 = <span style="{{#ifeq:{{{nowrap|no}}}|yes|white-space:nowrap;}} {{#ifeq:{{{italic|no}}}|yes|font-style: italic; }}">{{#ifeq:{{{lcf|{{{lcfirst|no}}}}}}|yes|{{lcfirst:{{{2|{{#if:{{{1|}}} | {{{1|}}} <!--
   -->|{{if then show|{{#invoke:String|replace|{{#invoke:WikidataIB |getCommonsLink|qid={{{qid|}}}|onlycat=True}}|Category:|}}<!--
   -->|{{if then show|{{#invoke:String|replace|{{#invoke:WikidataIB |getCommonsLink|qid={{{qid|}}}|onlycat=True}}|Category:|}}<!--
   --> |{{PAGENAME}} }} }} }}} }}<!--
   --> |{{PAGENAME}} }} }} }}} }}<!--
Line 16: Line 8:
   -->|{{if then show|{{#invoke:String|replace|{{#invoke:WikidataIB |getCommonsLink|qid={{{qid|}}}|onlycat=True}}|Category:|}}<!--
   -->|{{if then show|{{#invoke:String|replace|{{#invoke:WikidataIB |getCommonsLink|qid={{{qid|}}}|onlycat=True}}|Category:|}}<!--
   --> |{{PAGENAME}} }} }} }}}
   --> |{{PAGENAME}} }} }} }}}
}}</span>}}<!--
}}</span>]]'''''.<!--
  End of the template code, now add relevant tracking categories
  End of the template code, now add relevant tracking categories


Line 41: Line 33:
   }}
   }}
   }}
   }}
   }}</includeonly><noinclude>
   }}</includeonly>
}}<noinclude>
{{Documentation}}
{{Documentation}}
<!-- Add categories to the /doc subpage, not here! -->
<!-- Add categories to the /doc subpage, not here! -->
</noinclude>
</noinclude>

Revision as of 19:38, 22 April 2020