Changes

Jump to navigation Jump to search

Template:Category

955 bytes added, 11:00, 22 October 2014
no edit summary
<noinclude>[[Image:Directed graph with back edge.svg|thumb|Where 2 is a subcategory of 1. In general, this kind of categorization doesn't make sense.]]This template helps with page categorizing. It's intented for use especially in other templates. Takes max. 5 parameters and starts to check category existence from the last one, only the last existing category is used as a result. == Examples ==<pre>{{Category|Europe|Germany|Bavaria|nonexistentcategory}}--> [[Category:Bavaria]] {{Category|Germany|Bavaria}}--> [[Category:Bavaria]] {{Category|Canada|Quebec|Montérégie}}--> [[Category:Quebec]]</pre> == Note ==Tthis template doesn't check if a category is under another category, picture is only informal. Therefore it's good to use for geo/administrative categories. Don't use it to put page in more categories e.g. ''<nowiki>{{Category|Poland|Slovakia|Border crossings}}</nowiki>''.</noinclude><includeonly><!---->{{#if: {{#if: {{{5|}}} | {{#ifexist: Category:{{{5}}} | true }} }} | [[Category:{{{5}}}]] |<!--
-->{{#if: {{#if: {{{4|}}} | {{#ifexist: Category:{{{4}}} | true }} }} | [[Category:{{{4}}}]] |<!--
-->{{#if: {{#if: {{{3|}}} | {{#ifexist: Category:{{{3}}} | true }} }} | [[Category:{{{3}}}]] |<!--
-->{{#if: {{#if: {{{2|}}} | {{#ifexist: Category:{{{2}}} | true }} }} | [[Category:{{{2}}}]] |<!--
-->{{#if: {{{1|}}} | {{#ifexist: Category:{{{1}}} | [[Category:{{{1}}}]] }} }} }} }} }} }}<!----></includeonly>

Navigation menu