Editing Help:Substitution
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 30:
Line 30:
To substitute a template, use the same syntax as for [[Help:Transclusion|transclusion]], but include <code>subst:</code> after the opening double braces. For example, to substitute the template {{tl|deletion}}, type <code><nowiki>{{subst:deletion}}</nowiki></code>. Parameters can be included as in the case of transclusion, for example <code><nowiki>{{subst:deletion|Some article}}</nowiki></code>. To substitute a template, use the same syntax as for [[Help:Transclusion|transclusion]], but include <code>subst:</code> after the opening double braces. For example, to substitute the template {{tl|deletion}}, type <code><nowiki>{{subst:deletion}}</nowiki></code>. Parameters can be included as in the case of transclusion, for example <code><nowiki>{{subst:deletion|Some article}}</nowiki></code>.
− Pages not in the template namespace can also be substituted, e.g. <code><nowiki>{{subst:User:Deadfire/Drafts}}</nowiki></code>. To substitute the current content of a page in mainspace (i.e. one with no namespace prefix), two colons are required, as in <code><nowiki>{{subst::Page}}</nowiki></code>. If a substituted page or template does not exist, the entire expression (with braces and subst:) will remain unchanged in the wikitext and on the page. + Pages not in the template namespace can also be substituted, e.g. <code><nowiki>{{subst:User:Deadfire/Drafts}}</nowiki></code>. To substitute the current content of a page in [[BTW:mainspace|mainspace]] (i.e. one with no namespace prefix), two colons are required, as in <code><nowiki>{{subst::Page}}</nowiki></code>. If a substituted page or template does not exist, the entire expression (with braces and subst:) will remain unchanged in the wikitext and on the page.
Use the same syntax to substitute variables and parser functions, e.g. <code><nowiki>{{subst:PAGENAME}}</nowiki></code> or <code><nowiki>{{subst:#switch:{{NUMBEROFADMINS}}|1=Foo|1000=Bar|#default=Baz}}</nowiki></code>. Use the same syntax to substitute variables and parser functions, e.g. <code><nowiki>{{subst:PAGENAME}}</nowiki></code> or <code><nowiki>{{subst:#switch:{{NUMBEROFADMINS}}|1=Foo|1000=Bar|#default=Baz}}</nowiki></code>.
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 30: | Line 30: | ||
To substitute a template, use the same syntax as for [[Help:Transclusion|transclusion]], but include <code>subst:</code> after the opening double braces. For example, to substitute the template {{tl|deletion}}, type <code><nowiki>{{subst:deletion}}</nowiki></code>. Parameters can be included as in the case of transclusion, for example <code><nowiki>{{subst:deletion|Some article}}</nowiki></code>. | To substitute a template, use the same syntax as for [[Help:Transclusion|transclusion]], but include <code>subst:</code> after the opening double braces. For example, to substitute the template {{tl|deletion}}, type <code><nowiki>{{subst:deletion}}</nowiki></code>. Parameters can be included as in the case of transclusion, for example <code><nowiki>{{subst:deletion|Some article}}</nowiki></code>. | ||
− | Pages not in the template namespace can also be substituted, e.g. <code><nowiki>{{subst:User:Deadfire/Drafts}}</nowiki></code>. To substitute the current content of a page in mainspace (i.e. one with no namespace prefix), two colons are required, as in <code><nowiki>{{subst::Page}}</nowiki></code>. If a substituted page or template does not exist, the entire expression (with braces and subst:) will remain unchanged in the wikitext and on the page. | + | Pages not in the template namespace can also be substituted, e.g. <code><nowiki>{{subst:User:Deadfire/Drafts}}</nowiki></code>. To substitute the current content of a page in [[BTW:mainspace|mainspace]] (i.e. one with no namespace prefix), two colons are required, as in <code><nowiki>{{subst::Page}}</nowiki></code>. If a substituted page or template does not exist, the entire expression (with braces and subst:) will remain unchanged in the wikitext and on the page. |
Use the same syntax to substitute variables and parser functions, e.g. <code><nowiki>{{subst:PAGENAME}}</nowiki></code> or <code><nowiki>{{subst:#switch:{{NUMBEROFADMINS}}|1=Foo|1000=Bar|#default=Baz}}</nowiki></code>. | Use the same syntax to substitute variables and parser functions, e.g. <code><nowiki>{{subst:PAGENAME}}</nowiki></code> or <code><nowiki>{{subst:#switch:{{NUMBEROFADMINS}}|1=Foo|1000=Bar|#default=Baz}}</nowiki></code>. |