Template:Category handler/doc

From Xenharmonic Wiki
Jump to navigation Jump to search
This template is implemented by the Lua module Module:Category handler.
This template invokes the following functions: category_handler from Category handler.
This documentation is for a draft template. It is incomplete and may not be in active development. If possible, editors are encouraged to help with its development. In the meantime, editors should avoid using this template across the Xenharmonic Wiki, except for testing.

Details: Currently in-progress and used for one other template. Category input may be adjusted.

Template:Category handler is intended as a metatemplate that helps templates categorize pages. It also suppresses categories depending on the namespace or subpage.

Usage

Categories are entered as unnamed parameters, as shown.

{{Category handler | cat 1 | cat 2 | cat 3 }}

For example, the code below

{{Category handler | Abstract MOS patterns | 8-tone scales}}

categorizes the page under the following categories.

[[Category:Abstract MOS patterns]][[Category:8-tone scales]]

For testing purposes, categories can be turned off by adding debug=1. Modifying the previous example

{{Category handler | Abstract MOS patterns | 8-tone scales | debug=1 }}

disables categories. Typical use as part of another template should instead use something like debug={{{debug|}}}, so that debug=1 can be added to an instance of that template.