Editing Help:Templates
From TemeraireWiki
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.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 9: | Line 9: | ||
:<code><nowiki>{{Name}}</nowiki></code> includes the current content of the page <nowiki>"[[Template:Name]]"</nowiki>. | :<code><nowiki>{{Name}}</nowiki></code> includes the current content of the page <nowiki>"[[Template:Name]]"</nowiki>. | ||
:<code><nowiki>{{subst:Name}}</nowiki></code> inserts the content of the page <nowiki>"[[Template:Name]]"</nowiki> when you save your text. | :<code><nowiki>{{subst:Name}}</nowiki></code> inserts the content of the page <nowiki>"[[Template:Name]]"</nowiki> when you save your text. | ||
− | :<code><nowiki>{{msgnw:Name}}</nowiki></code> includes the template in raw wiki syntax, like <code><nowiki><nowiki></nowiki></code> does | + | :<code><nowiki>{{msgnw:Name}}</nowiki></code> includes the template in raw wiki syntax, like <code><nowiki><nowiki></nowiki></code> does |
==Using parameters in templates== | ==Using parameters in templates== | ||
+ | <div style="float:right"> | ||
+ | {| {{Prettytable}} | ||
+ | |- | ||
+ | |{{Hl2}} colspan="2" align="center" |'''Template with numbered parameters''' | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | <pre><nowiki> | ||
+ | '''A little thank you...'''<br> | ||
+ | <small>for {{{1}}}.<br> | ||
+ | hugs, {{{2}}}</small> | ||
+ | </nowiki></pre> | ||
+ | |- | ||
+ | |{{Hl2}}|'''You type''' | ||
+ | |{{Hl2}}|'''You get''' | ||
+ | |- | ||
+ | |<code><nowiki>{{Thankyou|all|~~~}}</nowiki></code> | ||
+ | | | ||
+ | {{Thankyou|all|[[User:Someuser|Someuser]]}} | ||
+ | |- | ||
+ | |{{Hl2}} colspan="2" align="center" |'''with named parameters''' | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | <pre><nowiki> | ||
+ | '''A little thank you...'''<br> | ||
+ | <small>for {{{reason}}}.<br> | ||
+ | hugs, {{{signature}}}</small> | ||
+ | </nowiki></pre> | ||
+ | |- | ||
+ | |{{Hl2}}|'''You type''' | ||
+ | |{{Hl2}}|'''You get''' | ||
+ | |- | ||
+ | |<pre><nowiki>{{Thankyou | ||
+ | |reason=all | ||
+ | |signature=~~~}}</nowiki></pre> | ||
+ | | | ||
+ | {{Thankyou|all|[[User:Someuser|Someuser]]}} | ||
+ | |} | ||
+ | </div> | ||
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>. | ||