Difference between revisions of "Help:Templates"

From FamiLAB Wiki
Jump to: navigation, search
Line 1: Line 1:
 
If you have standard texts you want to include on several pages, the MediaWiki template feature comes into play. Templates are wiki pages which can be inserted into other pages in three ways:
 
If you have standard texts you want to include on several pages, the MediaWiki template feature comes into play. Templates are wiki pages which can be inserted into other pages in three ways:
* {{nw|{{Name}}}} includes the content of the page "[[Template:Name]]"
+
* <code><nowiki>{{Name</nowiki></code>}} includes the content of the page "[[Template:Name]]"
* {{nw|{{subst:Name}}}} inserts the content of the page "[[Template:Name]]" when you save your text
+
* <code><nowiki>{{subst:Name</nowiki></code>}} inserts the content of the page "[[Template:Name]]" when you save your text
* {{nw|{{msgnw:Name}}}} include the template in raw wiki syntax, like {{nw|<nowiki>}} does
+
* <code><nowiki>{{msgnw:Name</nowiki></code>}} include the template in raw wiki syntax, like <code><nowiki>&gt;nowiki&lt;</nowiki></code> does
  
You create a template like any other wiki page. It must be prefixed with {{nw|Template}}.
+
 
 +
You create a template like any other wiki page. It must be prefixed with <code><nowiki>Template</nowiki></code>.
 
   
 
   
 
==Parameters==
 
==Parameters==
  
{{PD}}</nowiki>
+
{{PD}}

Revision as of 08:11, 31 August 2005

If you have standard texts you want to include on several pages, the MediaWiki template feature comes into play. Templates are wiki pages which can be inserted into other pages in three ways:

  • {{Name}} includes the content of the page "Template:Name"
  • {{subst:Name}} inserts the content of the page "Template:Name" when you save your text
  • {{msgnw:Name}} include the template in raw wiki syntax, like >nowiki< does


You create a template like any other wiki page. It must be prefixed with Template.

Parameters

Template:PD