Template:Nst

The UESPWiki – Your source for The Elder Scrolls since 1995
Jump to: navigation, search
Due to the sensitive nature of this template and the fact that it is used on a large number of pages, it has been semi-protected to prevent site-wide damage by vandal bots.
Editors: In order to minimize the impact on our servers, please use sandboxes to make and test changes to widely used templates before deployment.
For more information, please see this article's talk page.
Semi Protection

Summary

The Nst (short for "NamespaceText") template allows different text to be used in different namespaces without having to use cumbersome {{#if:...}} or {{#switch:...}} statements. Note, however, that unlike a {{#switch:...}} statement, you must specify custom text in each namespace, so switches may be the better choice in some instances.

Parameters

Nst
Parameter Scope Description
1 optional The default text to display. Can be empty or omitted if nothing should be displayed by default.
(Namespace
Name or ID)
optional Namespace-specific text to display.

Examples

{{Nst|Example|Skyrim=Skyrim Example|Template=Template Example}}

Example (if used in Morrowind space)
Skyrim Example (if used in Skyrim space)
Template Example (if used in Template space)


Here, on the other hand, a switch would be shorter (though debateably less clear) because the text is the same in each case:

{{Nst|Base text|OB=Custom text|SI=Custom text|SR=Custom text|DB=Custom text|Template=Custom text}}

{{#switch:{{NS_ID}}|OB|SI|SR|DB|Template=Custom text|Base text}}

Custom text

Custom text