Template:Ut: Difference between revisions
Template page
More actions
m expansion |
m fix leading colon bug since recent version of MediaWiki (which just wants one) |
||
| Line 1: | Line 1: | ||
{{#switch:-|{{{2}}}|{{{3}}}|{{{4}}}=User:}} | {{#switch: - | ||
|{{{2|}}} |{{{3|}}} |{{{4|}}} = User: | |||
}}[[:{{#if: {{{3|}}} | |||
-->|{{#if:{{{2|}}}|{{#switch:{{{2}}}|+=User:{{#if:{{{1|}}}|{{{1}}}|Example}} | | {{#switch: {{{3|}}} | ||
|+ |- = | |||
|#default = {{{3|}}}: | |||
}} | |||
}}User talk:{{#if: {{{1|}}} | {{{1|}}} | Example }}<!-- | |||
-->|<!-- | |||
-->{{#if: {{{2|}}} | |||
| {{#switch: {{{2|}}} | |||
|+ = User:{{#if: {{{1|}}} | {{{1|}}} | Example }} | |||
|- = {{#if: {{{1|}}} | {{{1|}}} | Example }} | |||
|#default = {{#switch: + | |||
|{{{3|}}} |{{{4|}}} = User: | |||
}}{{{2|}}} | |||
}} | |||
| {{#switch: + | |||
|{{{3|}}} |{{{4|}}} = User: | |||
}}{{#if: {{{1|}}} | {{{1|}}} | Example }} | |||
}}]]<noinclude> | |||
---- | ---- | ||
This is creating a link to a user's talk page. It hides the "User talk:" prefix. | This is creating a link to a user's talk page. It hides the "User talk:" prefix. | ||
== Usage == | |||
<nowiki>{{</nowiki> | * <code><nowiki>{{</nowiki>Ut|Username}}</code> → {{Ut|Username}} | ||
*: (which is the same as writing out <code><nowiki>[[User talk:Username|Username]]</nowiki></code>) | |||
<nowiki>{{</nowiki> | * <code><nowiki>{{</nowiki>Ut|Username|Nickname}}</code> → {{Ut|Username|Nickname}} | ||
*: (which is the same as writing out <code><nowiki>[[User talk:Username|Nickname]]</nowiki></code>) | |||
<nowiki>{{</nowiki> | * <code><nowiki>{{</nowiki>Ut|Username|3=fr}}</code> → {{Ut|Username|3=fr}} | ||
*: (which is the same as writing out <code><nowiki>[[:fr:User talk:Username|Username]]</nowiki></code> or <code><nowiki>[[:fr:Discussion utilisateur:Username|Username]]</nowiki></code>) | |||
== Prefix == | |||
The username can be prefixed with the namespace identifier "User:". | The username can be prefixed with the namespace identifier "User:". | ||
* <nowiki>{{</nowiki>Ut|Username|+}} → {{Ut|Username|+}} (with the "+" sign for parameter 2, 3 or 4; prefix part of the link) | |||
: | :* | ||
{{Commons:Link templates/User and user talk links}} | {{Commons:Link templates/User and user talk links}} | ||
[[Category:Username internal link templates|{{PAGENAME}}]] | [[Category:Username internal link templates|{{PAGENAME}}]] | ||
[[Category:Interwiki link templates|{{PAGENAME}}]] | [[Category:Interwiki link templates|{{PAGENAME}}]] | ||
</noinclude> | </noinclude> | ||
Revision as of 15:11, 8 November 2018
This is creating a link to a user's talk page. It hides the "User talk:" prefix.
Usage
{{Ut|Username}}→ Username- (which is the same as writing out
[[User talk:Username|Username]])
- (which is the same as writing out
{{Ut|Username|Nickname}}→ Nickname- (which is the same as writing out
[[User talk:Username|Nickname]])
- (which is the same as writing out
{{Ut|Username|3=fr}}→ Username- (which is the same as writing out
[[:fr:User talk:Username|Username]]or[[:fr:Discussion utilisateur:Username|Username]])
- (which is the same as writing out
Prefix
The username can be prefixed with the namespace identifier "User:".
- {{Ut|Username|+}} → User:Username (with the "+" sign for parameter 2, 3 or 4; prefix part of the link)
{{Commons:Link templates/User and user talk links}}