Template:Test

Template:Test allows wiki pages to transclude text from the Comprehensive Rules without labor-intensive copy/pasting and formatting. The text returned is neatly formatted and encapsulated, and includes the date of the most recent rules change as an indicator of accuracy.

This template supports searches for defined rules terminology and glossary vocabulary. If absolutely necessary, it can also search for a rules entry by its index (the combination of numbers and letters preceding a specific line in the Comprehensive Rules), but this is not recommended, as new rules changes may alter the text at a given index.

Again, using the title of a rules section is recommended where possible.

Template:CR can also be used to format a wiki-linked table of contents for higher-level article pages.

Usage
Template:CR accepts up to four values, though some combinations do not make sense.


 * lookup
 * The term or index to search for in the Comprehensive Rules. For example, trample, Limited, or 112.
 * exact
 * If included, the returned text will include only the first line of text matching the lookup.
 * toc
 * If included, attempts to generate a table of contents starting at the lookup. Only works with numeric, index-based lookups, not titles.
 * glossary
 * If included, confines the search to the glossary at the end of the CR. Generally not necessary, but may improve performance.

Any parameter other than "exact", "glossary", or "toc" is assumed to be the lookup. Parameters can be explicitly labelled, however. All of the following return the same result.

Title vs. index
Code:

Result: Code:

Result:

Table of contents
limits the transcluded text to one level of nesting within the rules, appropriate for making a table of contents or giving an overview.

Code:

Result:

Exact
limits the transluded text to only the index specified, without any nested subsections.

Code:

Result:

Glossary
limits the search to only the glossary of the Comprehensive Rules. If omitted, a search for a non-numeric lookup will attempt to search the glossary if that term is not found in the body of the Rules.

Rules terms
Code:

Result: Code:

Result:

Non-rules terms
Code:

Result: