Template:Categorize

From HorizonXI Wiki
Revision as of 11:45, 30 July 2023 by Aramachus (talk | contribs) (added chatgpt interpreted documentation on template behavior)


this documentation was generated by chatgpt's interpretation of the template code. Trust at your own responsibility.

Template: Categorize

The "Categorize" template allows you to conditionally hide or suppress the output based on the value of the first parameter and the current namespace.

Usage

{{Categorize|parameter|fallback}}

- parameter: The value you want to evaluate. If it matches specific cases, the output will be suppressed. - fallback (optional): The fallback value to display if the first parameter doesn't match any cases or is not provided.

Cases

- If the first parameter matches "no categories," "no cat," or "nc," the output will be suppressed. - If the first parameter doesn't match any cases or is not provided, the output will depend on whether the template is used within a namespace or outside of any namespace, and it will be controlled by the fallback value.

Example

{{Categorize|no categories|This template is used outside a namespace.}}

If used in the main namespace, the output will be suppressed. If used in any other namespace, the output will be "This template is used outside a namespace."

For any other parameter values, the output will follow the same behavior based on the specified cases and fallback.

Please note: This template should be used for conditional output control when dealing with categories or namespace-related conditions.