No edit summary Tag: sourceedit |
No edit summary Tag: Help |
||
Line 32: | Line 32: | ||
[[ja:ヘルプ:テンプレートの置換]] |
[[ja:ヘルプ:テンプレートの置換]] |
||
[[pl:Pomoc:Substytucja szablonów]] |
[[pl:Pomoc:Substytucja szablonów]] |
||
⚫ | |||
+ | [[uk:Довідка:Вставка контенту з шаблонів]] |
||
[[vi:Trợ giúp:Thay thế bản mẫu]] |
[[vi:Trợ giúp:Thay thế bản mẫu]] |
||
[[zh:Help:替換引用模板]] |
[[zh:Help:替換引用模板]] |
||
⚫ | |||
[[Category:Editing]] |
[[Category:Editing]] |
Revision as of 13:53, 25 May 2018
Template substitution is an alternate way to embed information contained in a template. Substitution is performed by placing the code subst:
between the template braces, before the template name, like this:
{{subst:Templatename}}
How does substituting work?
Normally, when the code for a template named {{something}}
is added to a page, it will still say {{something}}
in the wikitext when you next edit the page.
However, if you substitute a template, the text {{subst:something}}
will be replaced with the full template code from Template:Something when you save the page. If you edit the page again, you will no longer see {{subst:something}}
in the text:
Why would I use this?
One reason is for things like welcome templates. Substituting these can be a good idea because welcome templates may change over time, and it can be odd to have someone's talk page change long after they have seen the notice. In addition, substituting it can give a better impression, as actual code can look more "human" than text saying {{welcome}}
.
It can also be useful if the template is supposed to be edited manually after it has been placed.
See also
Further help and feedback
- Browse and search other help pages at Help:Contents
- Check Fandom Community Central for sources of further help and support
- Check Contacting Fandom for how to report any errors or unclear steps in this article