Difference between revisions of "Template:Delay subst/doc"

From blackwiki
Jump to navigation Jump to search
imported>Wbm1058
({{Subst only}})
imported>WOSlinker
(tidy style)
 
(3 intermediate revisions by 2 users not shown)
Line 7: Line 7:
 
With certain coding, subst: does not automatically convert when it is saved. An editor can create wikitext that is only converted when saved again.
 
With certain coding, subst: does not automatically convert when it is saved. An editor can create wikitext that is only converted when saved again.
  
Normally wikitext like <code><nowiki>{{subst:a}}</nowiki></code> is not saved as <code><nowiki>{{subst:a}}</nowiki></code> if <code><nowiki>{{template:a}}</nowiki></code> exists, because [[help:substitution|subst:]] pastes the coding of template:a in the saved page.  
+
Normally wikitext like <code><nowiki>{{subst:a}}</nowiki></code> is not saved as <code><nowiki>{{subst:a}}</nowiki></code> if <code><nowiki>{{template:a}}</nowiki></code> exists, because [[help:substitution|subst:]] pastes the coding of template:a in the saved page.
 +
 
 +
This template makes it easy to save [[mw:Manual:Creating pages with preloaded text|preload pages]] such as [[Template:RMassist/preload]].
  
 
==Delaying template substitution==
 
==Delaying template substitution==
Line 13: Line 15:
  
 
{|style="border-style: solid; border: 1px solid #000" cellpadding=10
 
{|style="border-style: solid; border: 1px solid #000" cellpadding=10
|-valign=top
+
|- style="vertical-align:top;"
 
!template used
 
!template used
 
!template coding
 
!template coding

Latest revision as of 22:25, 16 November 2014

Usage

With certain coding, subst: does not automatically convert when it is saved. An editor can create wikitext that is only converted when saved again.

Normally wikitext like {{subst:a}} is not saved as {{subst:a}} if {{template:a}} exists, because subst: pastes the coding of template:a in the saved page.

This template makes it easy to save preload pages such as Template:RMassist/preload.

Delaying template substitution

"Subst" can be delayed with one save by creating and using {{delay subst}}.

template used template coding Paste or type Save Result
Template:Delay subst {{subst: {{subst:delay subst}}a|b}} save page {{subst:a|b}}

On the next save (with or without edits elsewhere on the page) results in substitution of template "a".

See also