Template:MagicCategory/doc

From Palia Wiki
Jump to navigation Jump to search

Usage

{{MagicCategory}} is a helper template for outputting categories

Syntax

{{MagicCategory|categories}}
  • categories is a comma-separated array of categories
  • Blank categories will not be outputted

Examples

{{MagicCategory|,,,,,,}}

Will not add any categories

{{MagicCategory|Furniture,Tools,Some Other Category}}

Will add the categories Furniture, Tools, and Some Other Category to the page

{{MagicCategory|
 {{#if:|Furniture}},
 Tools,
 Some Other Category
}}

Here the {{#if:}} is blank, and does not output the category Furniture, so it will add the categories Tools and Some Other Category to the page

{{MagicCategory|
 {{#if:true|Furniture,Tools}},
 Some Other Category
}}

This {{#if:}} is true, and it contains two categories! So it'll add all three categories to the page

Related