Predefinição:NamespaceText
Summary
This 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.
You can also use {{Nst}} as a shortcut.
Parameters
NamespaceText | ||
---|---|---|
Parâmetero | Escopo | Descrição |
1 |
optional | The default text to display. Can be empty or omitted if nothing should be displayed by default. |
(Namespace |
optional | Namespace-specific text to display. |
Examples
{{NamespaceText|Example|OB=Oblivion Example|Skyrim=Skyrim Example|Template=Template Example}}
Example
Here, on the other hand, a switch would be shorter (though perhaps less readable):
{{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}}
Base text
Base text