Jump to: navigation, search

Unsubst


Revision as of 14:35, 23 January 2013 by JKN (Talk | contribs) (1 revision)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
[view] [edit] [history] [purge] Documentation icon Template documentation


Helper template to facilitate a substituted template transform into a template transclusion.

Maintenance templates, such as {{Citation needed}} or {{Refimprove}}, should never be substituted. A trick to avoid that is make a template substitute to its transcluded form.

Usage

To turn a template into a self-substituting template, wrap the existing template code with:

{{ {{{|safesubst:}}}ifsubst|<includeonly>{{subst:Unsubst|TEMPLATENAME| 1|{{{1|¬}}} | 2|{{{2|¬}}} | named1|{{{named1|¬}}} }}</includeonly>|

 [ ... existing template code ... ]

}}

The name of the template and all parameter names and values supported by the template must be listed in the first line, as parameters of this template.

This template currently supports ten parameters. A parameter value of ¬ is not supported and will be treated like an undefined parameter.

See also

Zh:Template:Unsubst