Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Numinix MediaWiki Demo
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Help/Templates
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Mixing named and unnamed parameters === <!--T:273--> </translate> <translate><!--T:274--> If the template supports it, both kinds of parameters can be used in one call.</translate> <translate><!--T:465--> The template contents would be changed to:</translate> <syntaxhighlight lang="wikitext">'''A little thank you...''' for }}}}. Hugs, }}}}</syntaxhighlight> $1signature=$2<nowiki>}}</nowiki></code></tvar> results in:</translate> |1=<translate><!--T:451--> supporting both parameter types</translate> |2=<translate><!--T:452--> Me</translate> }} <translate><!--T:338--> Be careful when doing this, because it can result in conterintuitive results as unnamed parameter counts are based only on the unnamed parameters, not the named parameters.</translate> $1reason=$2<nowiki>}}</nowiki></code></tvar> results in:</translate> |1=<translate><!--T:455--> Me</translate> |2=<translate><!--T:456--> supporting both parameter types</translate> }} <translate><!--T:340--> The template is coded to prefer the named parameter for the reason over the unnamed parameter, resulting in the "Me" being lost and no signature being given.</translate> <translate><!--T:341--> This results in a default value of <tvar name=1>}</tvar> being shown, as explained below.</translate> reason=$1$2<nowiki>}}</nowiki></code></tvar> results in:</translate> |1=<translate><!--T:460--> supporting both parameter types</translate> |2=<translate><!--T:461--> Me</translate> }} <translate><!--T:464--> Even though "Me" is the second parameter, it is the first ''unnamed'' parameter, and so it is assigned to <tvar name=1><nowiki>}</nowiki></tvar> and <tvar name=2><nowiki>}</nowiki></tvar> is left unassigned.</translate> <translate>
Summary:
Please note that all contributions to Numinix MediaWiki Demo may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Project:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)