Template:Substitution/doc: Difference between revisions
meta>Wbm1058 |
meta>Geekdiva →Example: Clarified the note that you should not include a period to say to not include any ending punctuation because the template adds a period/full stop. Added more varied examples with sub-subheads. |
||
Line 7: | Line 7: | ||
===Parameters=== | ===Parameters=== | ||
The first parameter inserts a word between "should" and "be", | The first parameter inserts a word that you choose in between "should" and "be", such as "always" or "never." To have no word between "should" and "be", insert a space. | ||
The second parameter is optional. It adds text to the end of the sentence. | The second parameter is optional. It adds text to the end of the sentence. Note that you should '''''not''''' include punctuation at the end. The template will always include a full stop (a period) at the end for you. | ||
== | ==Examples== | ||
=== With a word and no additional text === | |||
<code><nowiki>{{Substitution|not}}</nowiki></code> | |||
produces: | |||
{{Substitution|not}} | |||
=== With a word and additional text === | |||
<code><nowiki>{{Substitution|only|if temperatures fall and it starts to snow}}</nowiki></code> | <code><nowiki>{{Substitution|only|if temperatures fall and it starts to snow}}</nowiki></code> | ||
Line 18: | Line 26: | ||
{{Substitution|only|if temperatures fall and it starts to snow}} | {{Substitution|only|if temperatures fall and it starts to snow}} | ||
=== With no word and additional text === | |||
Note the space in the first parameter. | |||
<code><nowiki>{{Substitution| |if you wish to ensure your emoji's image remains the same even if its template's image is changed}}</nowiki></code> | |||
produces: | |||
{{Substitution| |if you wish to ensure your [[wp:emojis|emoji image]] remains the same even if its template image is changed}} | |||
==See also== | ==See also== | ||
* {{ | * {{tl|Nosubst}} | ||
* {{ | * {{tl|Subst only}} | ||
* {{ | * {{tl|Transclusionless}} | ||
<includeonly> | <includeonly> | ||
[[Category:Template namespace templates]] | [[Category:Template namespace templates]] | ||
</includeonly> | </includeonly> |
Revision as of 06:27, 8 February 2016
This is a documentation subpage for Template:Substitution. It may contain usage information, categories and other content that is not part of the original template page. |
This template should not be substituted. |
Usage
Add this message box to a template's documentation to briefly explain the rules of substitution for the template.
Parameters
The first parameter inserts a word that you choose in between "should" and "be", such as "always" or "never." To have no word between "should" and "be", insert a space.
The second parameter is optional. It adds text to the end of the sentence. Note that you should not include punctuation at the end. The template will always include a full stop (a period) at the end for you.
Examples
With a word and no additional text
{{Substitution|not}}
produces:
This template should not be substituted. |
With a word and additional text
{{Substitution|only|if temperatures fall and it starts to snow}}
produces:
This template should only be substituted if temperatures fall and it starts to snow. |
With no word and additional text
Note the space in the first parameter.
{{Substitution| |if you wish to ensure your emoji's image remains the same even if its template's image is changed}}
produces:
This template should be substituted if you wish to ensure your emoji image remains the same even if its template image is changed. |
See also
- {{Nosubst}}
- {{Subst only}}
- {{Transclusionless}}