Template:Alias: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
| Line 1: | Line 1: | ||
{{#ifeq:{{{u}}}|1|{{{NAME}}}|{{#ifeq:{{{STAFF}}}|1|<span style="color:gold;">{{#tip-text:{{{NAME}}}|Also known as:<br>{{{ALIASES}}}}}</span>|{{#tip-text:{{{NAME}}}|Also known as:<br>{{{ALIASES}}}}}}}<nowiki/>}} | {{#ifeq:{{{u}}}|1|{{{NAME}}}|{{#ifeq:{{{STAFF}}}|1|<span style="color:gold;">{{#tip-text:{{{NAME}}}|Also known as:<br>{{{ALIASES}}}}}</span>|{{#tip-text:{{{NAME}}}|Also known as:<br>{{{ALIASES}}}}}<nowiki/>}}<nowiki/>}} | ||
<noinclude> | <noinclude> | ||
Revision as of 16:28, 29 May 2025
{{{NAME}}}
{{Alias|NAME=Test|ALIASES=Test200<br>Test300}}
{{Alias|NAME=Test|ALIASES=Test200<br>Test300|STAFF=1}}
This template allows for easy creation of name aliases.
For example, let's say player "Johnny", prefers to go by "John1000" but people know him by both names. This template will render the preferred name, "John1000", as well as a little tool tip that says something to the effect of "also known as Johnny".
Parameters:
- NAME: the preferred name.
- ALIASES: all the aliases as a <br>-separated list
- STAFF: renders the name yellow. For Tennis Staff, who are historically always yellow on forums, discord, etc. If true, set to 1.
- u: ONLY WHEN IN PAGES. Disable recoloring/tooltips, for special rendering situations like matchboxes. If true, set to 1.
Usage
In almost all cases, just call the template the name without any parameters, so for example {{Johnny}} will render as John1000.
However, if being used in a matchbox, a list, or anything that uses dynamic category rendering, you need to use the alternate method that only shows the preferred name: {{Johnny|u=1}}