Modèle:Substituted template/doc
{{#ifeq:doc |doc
|
{{#ifeq:show |show
|This is a documentation subpage for Modèle:Substituted template. It contains usage information, categories and other content that is not part of the original {{#if: |{{{text2}}} |{{#if: |{{{text1}}} |{{#ifeq:Modèle |Utilisateur |modèle template page |{{#if:Modèle |modèle page|article}}}}}}}}. |
}}{{#if: | | {{#ifexist:Modèle:Substituted template | [[Category:{{#switch:Modèle |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]] | }} }} | }}
Usage
This requires a basic understanding of templates:
- Substitution is a one-time copying of a template
- Transclusion is an updating copy of the template
For example, you can add Template:Refimprove section as {{Refimprove section}}. In the editing window it should appear as:
{{Refimprove section}}
which is relatively simple.
However, if someone uses the keyword subst: in front of the template ({{subst:Refimprove section}}), the template will disappear and be replaced with its internal workings:
{ {{{|safesubst:}}}#invoke:Unsubst||$N=Refimprove section |date=__DATE__ |$B= {{refimprove|section | name = Refimprove section | subst = <includeonly>{{subst:</includeonly><includeonly>substcheck}}</includeonly> | date = {{{date|}}} | talk = {{{talk|}}} }} }}
This is very confusing to most users, and doesn't allow them to easily understand what the code does. It also makes it much easier to mess up. As a general rule, all cleanup tags in articles should not be substituted.
If you see a template substituted in an article when it shouldn't be—and you understand what you're doing—either replace it yourself or ask at the Wikipedia:Village pump (technical).
See also
- Help:Substitution (guide to substitution)
- Wikipedia:Substitution#Templates that should not be substituted (list)
- Wikipedia:Substitution#Templates that should always be substituted (list)