Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:X: Difference between revisions

Template page
m -> mw
no docs
 
(16 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{ #switch:{{{1}}}
{{{{{|safesubst:}}}#switch:{{{1}}}
| NOTOC
<!-- __behaviour switches__ -->
| FORCETOC
| NOTOC | FORCETOC | TOC
| TOC = [[mw:Help:Section#Table of contents (TOC)|{{{2|&#95;_{{{1}}}_&#95;}}}]]
| NOEDITSECTION | NEWSECTIONLINK | NONEWSECTIONLINK
| NOEDITSECTION
| NOCONTENTCONVERT | NOCC
| NEWSECTIONLINK
| NOTITLECONVERT | NOTC
| NOCONTENTCONVERT | NOCC
| NOGALLERY
| NOGALLERY
| END | START
| NOTITLECONVERT | NOTC
| NOINDEX | INDEX
| END
| STATICREDIRECT
| START
| HIDDENCAT
| NOINDEX
= &#95;_[[mw:Help:Magic_words#Behavior_switches|{{{2|{{{1}}}}}}]]_&#95;
| INDEX
 
| STATICREDIRECT = [[mw:Help:Magic words#Other|{{{2|&#95;_{{{1}}}_&#95;}}}]]
<!-- {{behavior switches:}} -->
| HIDDENCAT = [[mw:Help:Category#Hidden categories|{{{2|&#95;_{{{1}}}_&#95;}}}]]
| PAGESIZE
| DEFAULTSORT = [[mw:Help:Magic words|{{{2|&#123;&#123;{{{1}}}:&#125;&#125;}}}]]
| PROTECTIONLEVEL
| REDIRECT = [[mw:Help:Redirect|{{{2|&#35;{{{1}}}}}}]]
| DISPLAYTITLE
| language = [[mw:Help:Extension:ParserFunctions#.23language:|{{{2|&#123;&#123;&#35;{{{1}}}:&#125;&#125;}}}]]
| DEFAULTSORT | DEFAULTSORTKEY | DEFAULTCATEGORYSORTKEY
| special
| PAGESINCATEGORY | PAGESINCAT
| tag = [[mw:Help:Magic words|{{{2|&#123;&#123;&#35;{{{1}}}:&#125;&#125;}}}]]
| NUMBERINGROUP | NUMINGROUP
| ns = [[mw:Help:Extension:ParserFunctions#NS|{{{2|&#123;&#123;{{{1}}}:&#125;&#125;}}}]]
| PAGESINNAMESPACE | PAGESINNS
| localurl | localurle
= &#123;&#123;[[mw:Help:Magic_words|{{{2|{{{1}}}:}}}]]&#125;&#125;
| urlencode
 
| anchorencode
<!-- #redirect: -->
| fullurl | fullurle
| REDIRECT | redirect
| filepath = [[mw:Help:Magic words#Namespaces and URLs|{{{2|&#123;&#123;{{{1}}}:&#125;&#125;}}}]]
= [[mw:Help:Redirects|{{{2|&#35;{{{1}}}}}}]]
| lc
 
| lcfirst
<!-- {{parser functions:}} -->
| uc
| localurl | localurle | fullurl | fullurle | filepath
| ucfirst
| urlencode | anchorencode
| formatnum
= &#123;&#123;[[mw:Help:Magic_words#URL_data|{{{2|{{{1}}}:}}}]]&#125;&#125;
| padleft
| ns | nse
| padright = [[mw:Help:Magic words#Formatting|{{{2|&#123;&#123;{{{1}}}:&#125;&#125;}}}]]
= &#123;&#123;[[mw:Help:Magic_words#Namespaces|{{{2|{{{1}}}:}}}]]&#125;&#125;
| grammar
| lc | lcfirst | uc | ucfirst
| plural = [[mw:Help:Magic words#Language-dependent word conversions|{{{2|&#123;&#123;{{{1}}}:&#125;&#125;}}}]]
| formatnum
| int
| padleft | padright
| msg
| grammar | plural
| raw = [[mw:Help:Magic words#Template modifiers|{{{2|&#123;&#123;{{{1}}}:&#125;&#125;}}}]]
= &#123;&#123;[[mw:Help:Magic_words#Formatting|{{{2|{{{1}}}:}}}]]&#125;&#125;
| msgnw = [[mw:Help:Template#msgnw|{{{2|&#123;&#123;{{{1}}}:&#125;&#125;}}}]]
| GENDER | gender
| subst = [[mw:Help:Substitution|{{{2|&#123;&#123;{{{1}}}:&#125;&#125;}}}]]
| int | msg | msgnw | raw
<!-- ParserFunctions -->
= &#123;&#123;[[mw:Help:Magic_words#Miscellaneous|{{{2|{{{1}}}:}}}]]&#125;&#125;
| expr = [[mw:Help:Extension:ParserFunctions#.23expr:|{{{2|&#123;&#123;&#35;{{{1}}}:&#125;&#125;}}}]]
| subst | safesubst
| if = [[mw:Help:Extension:ParserFunctions#.23if:|{{{2|&#123;&#123;&#35;{{{1}}}:&#125;&#125;}}}]]
= &#123;&#123;[[m:Help:Substitution|{{{2|{{{1}}}:}}}]]&#125;&#125;
| ifeq = [[mw:Help:Extension:ParserFunctions#.23ifeq:|{{{2|&#123;&#123;&#35;{{{1}}}:&#125;&#125;}}}]]
 
| ifexist = [[mw:Help:Extension:ParserFunctions#.23ifexist:|{{{2|&#123;&#123;&#35;{{{1}}}:&#125;&#125;}}}]]
<!-- {{#parser functions:}} -->
| ifexpr = [[mw:Help:Extension:ParserFunctions#.23ifexpr:|{{{2|&#123;&#123;&#35;{{{1}}}:&#125;&#125;}}}]]
| formatdate | dateformat
| switch = [[mw:Help:Extension:ParserFunctions#.23switch:|{{{2|&#123;&#123;&#35;{{{1}}}:&#125;&#125;}}}]]
= &#123;&#123;[[mw:Help:Magic_words#Formatting|{{{2|&#35;{{{1}}}:}}}]]&#125;&#125;
| time = [[mw:Help:Extension:ParserFunctions#.23time:|{{{2|&#123;&#123;&#35;{{{1}}}:&#125;&#125;}}}]]
| special
| rel2abs = [[mw:Help:Extension:ParserFunctions#.23rel2abs:|{{{2|&#123;&#123;&#35;{{{1}}}:&#125;&#125;}}}]]
| tag
| titleparts = [[mw:Help:Extension:ParserFunctions#.23titleparts:|{{{2|&#123;&#123;&#35;{{{1}}}:&#125;&#125;}}}]]
| language
| iferror = [[mw:Help:Extension:ParserFunctions#.23iferror:|{{{2|&#123;&#123;&#35;{{{1}}}:&#125;&#125;}}}]]
= &#123;&#123;[[mw:Help:Magic_words#Miscellaneous|{{{2|&#35;{{{1}}}:}}}]]&#125;&#125;
| [[mw:Help:Magic words|{{{2|&#123;&#123;{{{1}}}&#125;&#125;}}}]]
 
<!-- {{#ParserFunctions:}} -->
| expr | if | ifeq | ifexist | ifexpr | iferror
| rel2abs | switch | time | timel | titleparts
= &#123;&#123;[[mw:Help:Extension:ParserFunctions#.23{{{1}}}:|{{{2|&#35;{{{1}}}:}}}]]&#125;&#125;
 
<!-- {{variables}} -->
| SITENAME | SERVER | SERVERNAME | SCRIPTPATH
| DIRMARK | DIRECTIONMARK
| CURRENTVERSION
| CONTENTLANGUAGE | CONTENTLANG
| REVISIONID | REVISIONUSER
| REVISIONDAY | REVISIONDAY2 | REVISIONMONTH | REVISIONYEAR | REVISIONTIMESTAMP
= &#123;&#123;[[mw:Help:Magic_words#Technical_metadata|{{{2|{{{1}}}}}}]]&#125;&#125;
| NUMBEROFPAGES | NUMBEROFARTICLES | NUMBEROFFILES | NUMBEROFEDITS | NUMBEROFVIEWS
| NUMBEROFUSERS | NUMBEROFADMINS | NUMBEROFACTIVEUSERS
= &#123;&#123;[[mw:Help:Magic_words#Statistics|{{{2|{{{1}}}}}}]]&#125;&#125;
| NAMESPACE | NAMESPACEE | SUBJECTSPACE | SUBJECTSPACEE
| ARTICLESPACE | ARTICLESPACEE | TALKSPACE | TALKSPACEE
= &#123;&#123;[[mw:Help:Magic_words#Namespaces|{{{2|{{{1}}}}}}]]&#125;&#125;
| CURRENTMONTHNAMEGEN | LOCALMONTHNAMEGEN
= &#123;&#123;[[m:Help:Magic_words#Language-dependent_word_conversions|{{{2|{{{1}}}}}}]]&#125;&#125;
 
<!-- <extension tags> -->
| categorytree
= <[[mw:Extension:CategoryTree|{{{2|{{{1}}}}}}]]>
| charinsert
= <[[mw:Extension:CharInsert|{{{2|{{{1}}}}}}]]>
| hiero
= <[[mw:Extension:WikiHiero|{{{2|{{{1}}}}}}]]>
| imagemap
= <[[mw:Extension:ImageMap|{{{2|{{{1}}}}}}]]>
| inputbox
= <[[mw:Extension:InputBox|{{{2|{{{1}}}}}}]]>
| poem
= <[[mw:Extension:Poem|{{{2|{{{1}}}}}}]]>
| ref | references
= <[[mw:Extension:Cite/Cite.php|{{{2|{{{1}}}}}}]]>
| source | syntaxhighlight
= <[[mw:Extension:SyntaxHighlight GeSHi|{{{2|{{{1}}}}}}]]>
| timeline
= <[[mw:Extension:EasyTimeline|{{{2|{{{1}}}}}}]]>
 
<!-- other {{variables}} / anything else -->
| &#123;&#123;[[mw:Help:Magic words|{{{2|{{{1}}}}}}]]&#125;&#125;
}}<noinclude>
}}<noinclude>
 
{{No documentation|Information needs to be added to separate documentation page}}


----
----
'''M'''agic '''W'''ord '''L'''ink. Links to a help page about the magic word. Takes any kind and will add the correct syntax.
Links to a help page about the magic word and automatically adds the correct syntax (case sensitive in most cases).


* <nowiki>{{</nowiki>mwl|NAMESPACE}} → {{mwl|NAMESPACE}}
* <nowiki>{{</nowiki>x|NAMESPACE}} → {{x|NAMESPACE}}
* <nowiki>{{</nowiki>mwl|DEFAULTSORT}} → {{mwl|DEFAULTSORT}}
* <nowiki>{{</nowiki>x|DEFAULTSORT}} → {{x|DEFAULTSORT}}
* <nowiki>{{</nowiki>mwl|ifexist}} → {{mwl|ifexist}}
* <nowiki>{{</nowiki>x|ifexist}} → {{x|ifexist}}
* <nowiki>{{</nowiki>mwl|localurl}} → {{mwl|localurl}}
* <nowiki>{{</nowiki>x|localurl}} → {{x|localurl}}
* <nowiki>{{</nowiki>mwl|REDIRECT}} → {{mwl|REDIRECT}}
* <nowiki>{{</nowiki>x|REDIRECT}} → {{x|REDIRECT}}
* <nowiki>{{</nowiki>mwl|NOTOC}} → {{mwl|NOTOC}}
* <nowiki>{{</nowiki>x|safesubst}} → {{x|safesubst}}
* <nowiki>{{</nowiki>x|NOTOC}} → {{x|NOTOC}}
* <nowiki>{{</nowiki>x|categorytree}} → {{x|categorytree}}
...
...
 
{{Documentation}}
'''See also:'''
* {{tl|mwl2}} - same thing but doesn't make the brackets/underscores part of the link.
* {{tl|pfl}} - for linking to ParserFunctions help pages. {{tlf|mwl}}/{{tlf|mwl2}} can also, but this provides formatting options.
 
[[Category:Interwiki link templates|{{PAGENAME}}]]
[[Category:Interwiki link templates|{{PAGENAME}}]]
[[Category:Typing-aid templates|{{PAGENAME}}]]
[[Category:One-letter templates| ]]
</noinclude>
</noinclude>

Latest revision as of 00:04, 31 July 2026

{{{{{1}}}}}



Links to a help page about the magic word and automatically adds the correct syntax (case sensitive in most cases).

...

Template documentation[ view · edit · history · purge ]
This documentation is transcluded from Template:X/doc.

Helper template that links to a magic-word or parser-function help page on MediaWiki.org with the correct syntax. Case-sensitive in most cases.

Examples

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