https://wiki.bzflag.org/index.php?title=Help:Templates&feed=atom&action=historyHelp:Templates - Revision history2024-03-28T10:41:33ZRevision history for this page on the wikiMediaWiki 1.26.3https://wiki.bzflag.org/index.php?title=Help:Templates&diff=114&oldid=prevJoevano at 01:44, 11 February 20072007-02-11T01:44:53Z<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;' lang='en'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 01:44, 11 February 2007</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l89" >Line 89:</td>
<td colspan="2" class="diff-lineno">Line 89:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>;Template uses</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>;Template uses</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>*[[Help:External searches]]</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>*[[Help:External searches]]</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">==External links==</del></div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> </div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">{{meta|Help:Template}}</del></div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"></pre></div></del></div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Help|Templates]]</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Help|Templates]]</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">{{Languages|Help:Templates}}</del></div></td><td colspan="2"> </td></tr>
</table>Joevanohttps://wiki.bzflag.org/index.php?title=Help:Templates&diff=68&oldid=prevJoevano: 1 revision(s)2007-02-10T21:13:26Z<p>1 revision(s)</p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;' lang='en'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 21:13, 10 February 2007</td>
</tr><tr><td colspan='4' style='text-align: center;' class='diff-multi' lang='en'>(2 intermediate revisions by the same user not shown)</td></tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">{{PD Help Page}}</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>If you have standard texts you want to include on several pages, the MediaWiki template feature comes into play (like the tag above which is included in the pages of the Help namespace).</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>If you have standard texts you want to include on several pages, the MediaWiki template feature comes into play (like the tag above which is included in the pages of the Help namespace).</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
</table>Joevanohttps://wiki.bzflag.org/index.php?title=Help:Templates&diff=25&oldid=prevJoevano at 20:06, 10 February 20072007-02-10T20:06:28Z<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;' lang='en'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 20:06, 10 February 2007</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">{{PD Help Page}}</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>If you have standard texts you want to include on several pages, the MediaWiki template feature comes into play (like the tag above which is included in the pages of the Help namespace).</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>If you have standard texts you want to include on several pages, the MediaWiki template feature comes into play (like the tag above which is included in the pages of the Help namespace).</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
</table>Joevanohttps://wiki.bzflag.org/index.php?title=Help:Templates&diff=20&oldid=prevJoevano: New page: {{PD Help Page}} If you have standard texts you want to include on several pages, the MediaWiki template feature comes into play (like the tag above which is included in the pages of the H...2007-02-10T20:00:30Z<p>New page: {{PD Help Page}} If you have standard texts you want to include on several pages, the MediaWiki template feature comes into play (like the tag above which is included in the pages of the H...</p>
<p><b>New page</b></p><div>{{PD Help Page}}<br />
If you have standard texts you want to include on several pages, the MediaWiki template feature comes into play (like the tag above which is included in the pages of the Help namespace).<br />
<br />
==Creating a template==<br />
Template names are prefixed with <code>Template:</code>, you create them like any other wiki page.<br />
<br />
==Using a template==<br />
Templates are wiki pages which can be used in other pages in three ways:<br />
:<code><nowiki>{{Name}}</nowiki></code> includes the current content of the page <nowiki>"[[Template:Name]]"</nowiki>. <br />
:<code><nowiki>{{subst:Name}}</nowiki></code> inserts the content of the page <nowiki>"[[Template:Name]]"</nowiki> when you save your text. <br />
:<code><nowiki>{{msgnw:Name}}</nowiki></code> includes the template in raw wiki syntax, like <code><nowiki>&lt;nowiki&gt;</nowiki></code> does<br />
<br />
==Using parameters in templates==<br />
<div style="float:right"><br />
{| {{Prettytable}} <br />
|-<br />
|{{Hl2}} colspan="2" align="center" |'''Template with numbered parameters''' <br />
|-<br />
| colspan="2" |<br />
<pre><nowiki> <br />
'''A little thank you...'''<br><br />
<small>for {{{1}}}.<br><br />
hugs, {{{2}}}</small><br />
</nowiki></pre> <br />
|-<br />
|{{Hl2}}|'''You type''' <br />
|{{Hl2}}|'''You get'''<br />
|-<br />
|<code><nowiki>{{Thankyou|all|~~~}}</nowiki></code><br />
|<br />
{{Thankyou|all|[[User:Someuser|Someuser]]}}<br />
|-<br />
|{{Hl2}} colspan="2" align="center" |'''with named parameters''' <br />
|-<br />
| colspan="2" |<br />
<pre><nowiki> <br />
'''A little thank you...'''<br><br />
<small>for {{{reason}}}.<br><br />
hugs, {{{signature}}}</small><br />
</nowiki></pre> <br />
|-<br />
|{{Hl2}}|'''You type''' <br />
|{{Hl2}}|'''You get'''<br />
|-<br />
|<pre><nowiki>{{Thankyou<br />
|reason=all<br />
|signature=~~~}}</nowiki></pre><br />
|<br />
{{Thankyou|all|[[User:Someuser|Someuser]]}}<br />
|}<br />
</div><br />
You can define parameters in templates either numbered as <code><nowiki>{{{1}}}</nowiki></code> or named <code><nowiki>{{{param}}}</nowiki></code>. <br />
<br />
'''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.<br />
<br />
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>.<br />
<br />
==Control template inclusion==<br />
You can control template inclusion by the use of <code><nowiki><noinclude></nowiki></code> and<br />
<code><nowiki><includeonly></nowiki></code> tags.<br />
<br />
Anything between <code><nowiki><noinclude></nowiki></code> and <code><nowiki></noinclude></nowiki></code> will be processed and<br />
displayed only when the page is being viewed directly, not included.<br />
<br />
Possible applications are:<br />
* Categorising templates<br />
* Interlanguage links to similar templates in other languages<br />
* Explanatory text about how to use the template<br />
<br />
The converse is <code><nowiki><includeonly></nowiki></code>. Text between <code><nowiki><includeonly></nowiki></code> and<br />
<code><nowiki></includeonly></nowiki></code> will be processed and displayed only when the page is<br />
being included. The obvious application is to add all pages containing a given template to a category.<br />
<br />
Note that the usual update problems apply -- if you change the<br />
categories inside a template, the categories of the referring pages<br />
won't be updated until those pages are edited.<br />
==Making templates useful==<br />
For templates to be effective users need to find them and be able to use them. Wiki are not user friendly when it comes to finding, using and working with templates. A simple technique is to have a usage on the template page.<br />
For example<br />
<div style="display:table; width:auto;"><pre><br />
==Usage==<br />
Allows to establish a link to a subject:<br />
{{NameOfTemplate|Term1+Term2+Term3}}<br />
</pre></div><br />
<br />
The user can simply copy and paste the template to establish a new page that is similar to other pages. The example demonstrated is trival true, however a working example that demonstrates how templates can be used in complex situations to save time, accuracy and help categories pages on specialty topics more easily. see working example [http://www.clickwiki.info/index.php/Template:Object here]<br />
<br />
Also creating a Category:Template on your wiki to put your templates together may also be useful for editors along with links to this page will greatly improve productivity. [http://www.clickwiki.info/index.php/Category:Template example wiki category page]<br />
==See Also==<br />
;Template uses<br />
*[[Help:External searches]]<br />
==External links==<br />
{{meta|Help:Template}}<br />
</pre></div><br />
[[Category:Help|Templates]]<br />
{{Languages|Help:Templates}}</div>Joevanohttps://wiki.bzflag.org/index.php?title=Help:Templates&diff=67&oldid=prevJoewski: added more information of useful template techneques to document templates for use. Using all the techneques described on the page.2006-12-15T10:59:40Z<p>added more information of useful template techneques to document templates for use. Using all the techneques described on the page.</p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;' lang='en'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 10:59, 15 December 2006</td>
</tr><tr><td colspan='4' style='text-align: center;' class='diff-multi' lang='en'>(One intermediate revision by the same user not shown)</td></tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">{{PD Help Page}}</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>If you have standard texts you want to include on several pages, the MediaWiki template feature comes into play (like the tag above which is included in the pages of the Help namespace).</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>If you have standard texts you want to include on several pages, the MediaWiki template feature comes into play (like the tag above which is included in the pages of the Help namespace).</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
</table>Joewski