Template:Namespace detect

From Data Crystal
Jump to navigation Jump to search


This template, {{namespace detect}}, is intended for background usage, generally in other templates, so it's not really meant for end-users to worry about. It functions to identify the current namespace and return content tailored to that namespace.

Usage

The template should be called with parameters for each namespace to be used, e.g.:

{{namespace detect
 | main=  Hello world!
 | help=  How's it going, world?
 | other= Goodbye, cruel world!
}}

The results of this example should be roughly self-explanatory: if called on the main or help namespaces, the first two messages will appear, respectively. If called on any other namespace, the "other" message will appear. To show nothing at all, parameters may be left out entirely.