Template:ShowCategories: Difference between revisions
Jump to navigation
Jump to search
(template created) |
(forgot the var) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
[[Category:Templates]] | [[Category:Templates]] | ||
This simple template takes a single parameter ''page='' and returns a list of all the categories that the page belongs to.<br> | This simple template takes a single parameter ''page='' and returns a list of all the categories that the page belongs to.<br> | ||
The list is | Each category shown is just the category name without the prefix "category:". The list is unsorted, and a comma is used as the delimiter. | ||
Usage: | Usage: | ||
<pre><nowiki>{{ShowCategories|page= }}</nowiki></pre> | |||
</nowiki></pre> | </noinclude><includeonly>{{#arraymap:{{#show:{{{page}}}|?Category|link=none|format=list|sep=,}}|,|x|{{#sub:x|9}}}} | ||
</noinclude><includeonly>{{#show:{{{page}}}|?Category|link=none|sep=,}} |
Latest revision as of 11:06, 29 December 2012
This simple template takes a single parameter page= and returns a list of all the categories that the page belongs to.
Each category shown is just the category name without the prefix "category:". The list is unsorted, and a comma is used as the delimiter.
Usage:
{{ShowCategories|page= }}