Template:MagicCategory

From Palia Wiki
Jump to navigation Jump to search

This template defines the table "Categories". View table.

Template documentation
Note: portions of the template sample may not be visible without values provided.
View or edit this documentation. (About template documentation)
Editors can experiment in this template's sandbox and test case pages.

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