Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 42: | Line 42: | ||
hugs, {{{2}}}</small> | hugs, {{{2}}}</small> | ||
</nowiki></pre> | </nowiki></pre> | ||
|<code><nowiki>{{ | |<code><nowiki>{{Thankyou|all|~~~}}</nowiki></code> | ||
|{{ | |{{Thankyou|all|[[User:Someuser|Someuser]]}} | ||
|- | |- | ||
| Template with named parameters | | Template with named parameters | ||
Line 51: | Line 51: | ||
hugs, {{{signature}}}</small> | hugs, {{{signature}}}</small> | ||
</nowiki></pre> | </nowiki></pre> | ||
|<pre><nowiki>{{ | |<pre><nowiki>{{Thankyou | ||
|reason=all | |reason=all | ||
|signature=~~~ | |signature=~~~ | ||
}}</nowiki></pre> | }}</nowiki></pre> | ||
|{{ | |{{Thankyou|all|[[User:Someuser|Someuser]]}} | ||
|} | |} | ||
You can define parameters in templates either numbered as <code><nowiki>{{{1}}}</nowiki></code> or named <code><nowiki>{{{param}}}</nowiki></code>. | You can define parameters in templates either numbered as <code><nowiki>{{{1}}}</nowiki></code> or named <code><nowiki>{{{param}}}</nowiki></code>. | ||
'''Example:''' you want a little thank you note you can put other users on their talk page with a reason and your signature. In the [[Template: | '''Example:''' you want a little thank you note you can put other users on their talk page with a reason and your signature. In the [[Template:Thankyou]] you enter your text. | ||
When using the template on a page, you fill in the parameter values, separated by a pipe char (|): <code><nowiki>{{ | When using the template on a page, you fill in the parameter values, separated by a pipe char (|): <code><nowiki>{{Thankyou|all|~~~}}</nowiki></code> or - if you have used named parameters <code><nowiki>{{Thankyou|reason=all|signature=~~~}}</nowiki></code>. The advantage of using named parameters in your template is that they are flexible in order. It also makes the template easier to understand if you have many parameters. If you want to change the order of numbered parameters, you have to mention them explicitly: <code><nowiki>{{Thankyou|2=~~~|1=all}}</nowiki></code>. | ||
==Control template inclusion== | ==Control template inclusion== |