Help page: Edit

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>.

Please note that all contributions to BattleTechWiki are considered to be released under the GNU FDL 1.2 (see BattleTechWiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)

Advanced templates:

Editing: {{Merge}}   {{Moratorium}}   {{Otheruses| | | }}

Notices: {{NoEdit}}   {{Sign}}   {{Unsigned|name}}   {{Welcome}}

Administration: {{Essay}}   {{Policy}}   {{Procedure}}

Templates used on this page:

This page is a member of 2 hidden categories: