Template:Commons category: Difference between revisions
Content added Content deleted
(Undid revision 681550535 by Nyttend (talk) don't pre-empt the outcome of Wikipedia:Categories for discussion/Log/2015 August 20#Category:Commons category template with no category set) |
(use category defined on wikidata if no parameter is given) |
||
Line 3: | Line 3: | ||
<!-- {{#if:x|}} strips whitespace from parameter 1, |
<!-- {{#if:x|}} strips whitespace from parameter 1, |
||
in case it is fed like this: {{Commons category| Some cat }}. --> |
in case it is fed like this: {{Commons category| Some cat }}. --> |
||
|Category:{{#if: |
|1=Category:{{#if:{{{1|}}} |
||
|{{{1|}}} |
|||
|{{#if:{{#property:P373}} |
|||
-->}}<includeonly>{{#if:{{{1|}}}||[[Category:Commons category template with no category set]]}}</includeonly><noinclude> |
|||
|{{#property:P373}} |
|||
|{{PAGENAME}} |
|||
}} |
|||
}} |
|||
|2={{{2|{{{1|{{PAGENAME}}}}}}}}<!-- |
|||
-->}}<noinclude> |
|||
{{Documentation}} |
{{Documentation}} |
||
<!-- Add categories |
<!-- Add categories to the /doc subpage, not here! --> |
||
</noinclude><includeonly><!-- Some tracking categories to see if we're ready to switch to Wikidata --> |
</noinclude><includeonly>{{#if:{{{1|}}}||{{#if:{{#property:P373}}||[[Category:Commons category template with no category set]]}}}}<!-- Some tracking categories to see if we're ready to switch to Wikidata --> |
||
{{#switch:{{NAMESPACE}}||{{ns:14}}=<!-- Only articles and categories. --> |
{{#switch:{{NAMESPACE}}||{{ns:14}}=<!-- Only articles and categories. --> |
||
{{#if:{{#property:P373}} |
{{#if:{{#property:P373}} |