Author: smjg
Description:
A number of templates on Wikipedia, such as those for placing boilerplate messages on user talk pages, are intended to be substituted. However, doing so creates a bit of markup bloat because of the conditional stuff in them. In other words, inserting e.g.
{{subst:uw-test1}}
on a page copies not only the text that actually appears on the page, but also the {{#if:...}} stuff that is in the template code.
The current workaround is to use
{{subst:uw-test1|subst:subst=}}
However, it seems likely that very few people (remember to) do this every time. It would therefore be good to have a keyword that defers substitution of a template within a template until the outer template is substituted.
I propose that subst1 be used for this purpose. Let Template:Outer contain {{subst1:Inner}}.
When viewing Template:Outer, this would display the contents of Template:Inner, just as if {{Inner}} had been used by itself. However, when {{subst:Outer}} is later entered on another page, the substitution process would automagically change {{subst1:Inner}} to {{subst:Inner}}, which is then immediately replaced by the contents of Template:Inner.
This would enable templates that use the |subst:subst= idiom to shrink slightly, from
{{{{{subst|}}}#if:{{{2|}}}|{{{2}}}|Thank you.}}
to
{{subst1:#if:{{{2|}}}|{{{2}}}|Thank you.}}
and at the same time stop people having to (forget to) add |subst:subst= to reduce the amount of markup code generated by these message templates.
Version: unspecified
Severity: enhancement
URL: http://en.wikipedia.org/wiki/Template:Uw-test1