1,770
edits
(other pages section; intro redo; - see below for inclusion tags (might make a new page); typos) |
(removed safesubst (got it a bit wrong + less relevant to the topic)) |
||
Line 59: | Line 59: | ||
<div style="padding: 5px 10px 5px; border-left: 5px solid lightpink;">In source editing, substitution is executed with word <code>subst:</code> in the template call, e.g. <code><nowiki>{{subst:Mirror universe}}</nowiki></code></div> | <div style="padding: 5px 10px 5px; border-left: 5px solid lightpink;">In source editing, substitution is executed with word <code>subst:</code> in the template call, e.g. <code><nowiki>{{subst:Mirror universe}}</nowiki></code></div> | ||
Note that substitution will increase the length of the wikicode on page considerably and might make difficult to edit. Some templates are designed so that they are dynamic, so substitution may defeat the purpose. | |||
Note that | |||
The wikicode of a template may also be called. | The wikicode of a template may also be called. | ||
Line 72: | Line 69: | ||
<div style="padding: 5px 10px 5px; border-left: 5px solid lightpink;">When transcluding or substituting a page other than a template, the template call is slightly different in source editing. The prefix “Template:” is left out, but the ''namespace'' prefix should be used for any other type of page. For example, this help page is called with <code><nowiki>{{Help:Templates}}</nowiki></code>. For main namespace (articles), the namespace prefix is empty, so only a colon : is used, for example <code><nowiki>{{:Tristan Wolf}}</nowiki></code> for [[Tristan Wolf]]. | <div style="padding: 5px 10px 5px; border-left: 5px solid lightpink;">When transcluding or substituting a page other than a template, the template call is slightly different in source editing. The prefix “Template:” is left out, but the ''namespace'' prefix should be used for any other type of page. For example, this help page is called with <code><nowiki>{{Help:Templates}}</nowiki></code>. For main namespace (articles), the namespace prefix is empty, so only a colon : is used, for example <code><nowiki>{{:Tristan Wolf}}</nowiki></code> for [[Tristan Wolf]]. | ||
Substitution of another page works similarly, but with <code><nowiki>subst:</nowiki></code> (or equivalent) ahead of the namespace prefix, e.g. <code><nowiki>{{subst:Help:Templates}}</nowiki></code> or <code><nowiki>{{ | Substitution of another page works similarly, but with <code><nowiki>subst:</nowiki></code> (or equivalent) ahead of the namespace prefix, e.g. <code><nowiki>{{subst:Help:Templates}}</nowiki></code> or <code><nowiki>{{subst::Tristan Wolf}}</nowiki></code></div> | ||
=== More on the topic === | === More on the topic === |
edits