From WikiTemp, the GBAtemp wiki
(random template)
(bah tmi)
 
(14 intermediate revisions by 2 users not shown)
Line 1: Line 1:
THISISAWORKING TEMPLATE!!!
+
[http://wiibrew.org/wiki/NUS_Downloader NUS Downloader]
  
{{PD Help Page}}
+
[[Category: Members of GBAtemp]]
aa
+
 
+
==Creating a template==
+
aaa
+
 
+
==Using a template==
+
aaa
+
*<code><nowiki>{{Name}}</nowiki></code> 'transcludes' (i.e. includes a copy of) the content of the template (stored in the page <nowiki>[[Template:Name]]</nowiki>) aaa
+
*<code><nowiki>{{subst:Name}}</nowiki></code>aaa. '''''Note''''': aaa
+
*<code><nowiki>{{msgnw:Name}}</nowiki></code>aaa <code><nowiki>&lt;nowiki&gt;</nowiki></code> does) aaa
+
 
+
aaa
+
 
+
*<code><nowiki>{{Template:Pagename}}</nowiki></code>  includes <code><nowiki>[[Template:Pagename]]</nowiki></code>
+
*<code><nowiki>{{Foo:Pagename}}</nowiki></code>      includes <code><nowiki>[[Foo:Pagename]]</nowiki></code>
+
*<code><nowiki>{{:Pagename}}</nowiki></code>          includes <code><nowiki>[[Pagename]]</nowiki></code>
+
 
+
bbbb
+
 
+
*<code><nowiki>{{Foo:Bar}}</nowiki></code>            includes <code><nowiki>[[Template:Foo:Bar]]</nowiki></code>
+
 
+
==Using parameters in templates==
+
<div style="float:right; margin:8px;">
+
{| {{Prettytable}}
+
|-
+
|{{Hl2}} colspan="2" align="center" |'''Template with numbered parameters'''
+
|-
+
| colspan="2" |
+
<pre><nowiki>
+
''bbb.'''<br>
+
<small>for {{{1}}}.<br>
+
hugs, {{{2}}}</small>
+
</nowiki></pre>
+
|-
+
|{{Hl2}}|'''bbbbb'''
+
|{{Hl2}}|'''bbbbbbb'''
+
|-
+
|<code><nowiki>{{aau|abbb|ace}}</nowiki></code>
+
|
+
{{aab|bbbba|s}}
+
|-
+
|{{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 your hard work
+
|signature=Joe}}</nowiki></pre>
+
|
+
{{Thankyou|all your hard work|Joe}}
+
|}
+
</div>
+
<code><nowiki>{{{1}}}</nowiki></code> or named <code><nowiki>{{{param}}}</nowiki></code>. 
+
 
+
''
+
 
+
When using the tem
+
 
+
Yo <code><nowiki>{{{reason|all your hard work}}}</nowiki></code> would result in ''"all your hard work"'' if no value was provided for the parameter <tt>reason</tt>.
+
 
+
==Control template inclusion==
+
You can control template inclusion by the use of <code><nowiki><noinclude></nowiki></code> and
+
<code><nowiki><includeonly></nowiki></code> tags.
+
 
+
Anything between <code><nowiki><noinclude></nowiki></code> and <code><nowiki></noinclude></nowiki></code> will be processed and
+
displayed only when the template's page is being viewed directly.
+
 
+
Possible applications are:
+
* Categorising templates
+
* Interlanguage links to similar templates in other languages
+
* Explanatory text about how to use the template
+
 
+
The converse is <code><nowiki><includeonly></nowiki></code>. Text between <code><nowiki><includeonly></nowiki></code> and <code><nowiki></includeonly></nowiki></code> will be processed and displayed only when the page is being included. The obvious application is to add all pages containing a given template to a [[Help:Categories|category]], without putting the template itself into that category.
+
 
+
 
+
==Organizing templates==
+
 
+
For example:
+
<div style="display:table; width:auto;"><pre>
+
<noinclude>
+
==Usage==
+
Allows to establish a link to a subject:
+
<nowiki>{{NameOfTemplate|Term1+Term2+Term3}}</nowiki>
+
</noinclude>
+
</pre></div>
+
 
+
*[[Help:External searches]] -- a template special use case example
+
*[[Help:Magic words]] -- fancy stuff you may find in some templates
+
*{{mediawiki|meta:Help:Embed page}} -- embedding pages from {{mediawiki|namespace|namespaces}} other than <code>Template:</code>.
+
 
+
[[Category:Help|{{PAGENAME}}]]
+
[[Category:Template]]
+
{{Languages|Help:Templates}}
+

Latest revision as of 18:49, 24 January 2011

NUS Downloader