Difference between revisions of "Template:WikiUsername"

From Team Fortress Wiki
Jump to: navigation, search
m (lets see if this works.)
m
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
<span class="usernamegoeshere">WikiUsername</span><noinclude>{{doc begin}}
+
<span class="usernamegoeshere">{{{1|WikiUsername}}}</span><noinclude>{{doc begin}}
 
{{tl|WikiUsername}} is a ''client-side'' template that dynamically displays the wiki username of the currently logged-in user.  
 
{{tl|WikiUsername}} is a ''client-side'' template that dynamically displays the wiki username of the currently logged-in user.  
  
Line 6: Line 6:
 
== Usage ==
 
== Usage ==
 
* ''{{tlx|WikiUsername}}'' displays ''{{WikiUsername}}''
 
* ''{{tlx|WikiUsername}}'' displays ''{{WikiUsername}}''
 +
* ''{{tlx|WikiUsername|Jane Doe}}'' displays ''{{WikiUsername|Jane Doe}}''
 +
** '''<span style="color: red">Important:</span>''' You must '''NOT''' set this parameter when transcluding this template on actual help articles or parts of the interface. It should ''always'' default to ''WikiUsername'' in such cases.
  
 
== Output ==
 
== Output ==
 
* If the user is '''logged in''' as ''TheSoldier'', the output will be: TheSoldier
 
* If the user is '''logged in''' as ''TheSoldier'', the output will be: TheSoldier
 
* If the user is '''not logged in''', the output will be: WikiUsername
 
* If the user is '''not logged in''', the output will be: WikiUsername
 
+
* If the user is '''not logged in''' and the first parameter says ''Jane Doe'', the output will be: Jane Doe
  
 
[[Category:Templates]]</noinclude>
 
[[Category:Templates]]</noinclude>

Latest revision as of 11:48, 20 May 2024

WikiUsername

Documentation for WikiUsername

{{WikiUsername}} is a client-side template that dynamically displays the wiki username of the currently logged-in user.

This template should only be used in interface messages, tutorials, or any other context where it is crucial to display the user's username. Do NOT use this template within other templates as it will not work properly.

Usage

  • {{WikiUsername}} displays WikiUsername
  • {{WikiUsername|Jane Doe}} displays Jane Doe
    • Important: You must NOT set this parameter when transcluding this template on actual help articles or parts of the interface. It should always default to WikiUsername in such cases.

Output

  • If the user is logged in as TheSoldier, the output will be: TheSoldier
  • If the user is not logged in, the output will be: WikiUsername
  • If the user is not logged in and the first parameter says Jane Doe, the output will be: Jane Doe