Template:W/doc: Difference between revisions

From Tardis Wiki, the free Doctor Who reference
m
Robot: Cosmetic changes
m (Robot: Cosmetic changes)
Line 1: Line 1:
'''{{tl|w}}''' is a handly little shortcut that equates the following markup:
'''{{tl|w}}''' is a handly little shortcut that equates the following markup:
<pre>[[wikipedia:article name]] --> {{w|article name}}</pre>
<pre>[[wikipedia:article name]] --> {{w|article name}}</pre>
==Usage==
== Usage ==
{{tl|w}} incorporates one kind of [[pipe trick]].  As long as the wikipedia article is '''not [[dab|disambiguated]]''', then it will automatically get rid of the prepending "wikipedia:".  Hence,  
{{tl|w}} incorporates one kind of [[pipe trick]].  As long as the wikipedia article is '''not [[dab|disambiguated]]''', then it will automatically get rid of the prepending "wikipedia:".  Hence,  
:<code><nowiki>{{w|London}}</nowiki></code> results in {{w|London}}.
:<code><nowiki>{{w|London}}</nowiki></code> results in {{w|London}}.
Line 8: Line 8:
::''but''
::''but''
:<code><nowiki>{{w|London (band)|London}}</nowiki></code> renders {{w|London (band)|London}}
:<code><nowiki>{{w|London (band)|London}}</nowiki></code> renders {{w|London (band)|London}}
==Note for editors from other wikis==
== Note for editors from other wikis ==
Other wikis use something similar to this template.  [[memoryalpha:Memory Alpha|Memory Alpha]], for instance uses a template with exactly the same name.  However, our {{tl|w}} is a bit different to [[memoryalpha:template:w]], in that it defaults to the name of the page if you don't add your own variable name.  In essence, Memory Alpha use {{tl|w}} to do not only what this one does, but also what {{tl|wikipediainfo}} does. The default value of the second variable in this template is the value of ''first'' variable — not the name of the page on which you're working.  That's why :<code><nowiki>{{w|London}}</nowiki></code> renders {{w|London}}.
Other wikis use something similar to this template.  [[memoryalpha:Memory Alpha|Memory Alpha]], for instance uses a template with exactly the same name.  However, our {{tl|w}} is a bit different to [[memoryalpha:template:w]], in that it defaults to the name of the page if you don't add your own variable name.  In essence, Memory Alpha use {{tl|w}} to do not only what this one does, but also what {{tl|wikipediainfo}} does. The default value of the second variable in this template is the value of ''first'' variable — not the name of the page on which you're working.  That's why :<code><nowiki>{{w|London}}</nowiki></code> renders {{w|London}}.


Bots, Bureaucrats, emailconfirmed, Administrators
765,429

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.