Difference between revisions of "Template:If/errmsg"
Jump to navigation
Jump to search
imported>Wikid77 (created, as subtemplate of Template:If, to display specially-formatted messages for Template:If) |
imported>Wikid77 (new parameter {t} for template name; reversed parameters to match parameter sequence as passed by Template:Ifexpr - not using parameter {4}) |
||
| Line 1: | Line 1: | ||
<noinclude><!-- | <noinclude><!-- | ||
-============================================================= | -============================================================= | ||
| − | - If/errmsg - Show message for Template:If | + | - If/errmsg - Show message for Template:If or Template:Ifexpr |
-============================================================= | -============================================================= | ||
- (see NOTES at bottom) | - (see NOTES at bottom) | ||
- | - | ||
--></noinclude><br> | --></noinclude><br> | ||
| − | <font color="#FF5511">'''ERROR: invalid parameters for [[Template: | + | <font color="#FF5511">'''ERROR: invalid parameters for [[Template:{{{t|Ifexpr}}}]]''':<br> <nowiki>{{</nowiki>{{{t|Ifexpr}}}|{{{3}}}|{{{1}}}|{{{2}}}<nowiki>}}</nowiki><br> Parameter 1 must be empty when using "1=" format.</font><noinclude> |
<!-- | <!-- | ||
-------------------------------------------------------------- | -------------------------------------------------------------- | ||
| Line 14: | Line 14: | ||
-- | -- | ||
-- NOTE A1: This template displays advisory messages for | -- NOTE A1: This template displays advisory messages for | ||
| − | -- the Template:If. | + | -- either the Template:If or Template:Ifexpr. |
-- | -- | ||
-- NOTE S2: This template can be subst-substituted by using | -- NOTE S2: This template can be subst-substituted by using | ||
| Line 25: | Line 25: | ||
--03Dec10 Put NOTES comments to explain template coding. | --03Dec10 Put NOTES comments to explain template coding. | ||
--03Dec10 Put HISTORY comments to log major changes (not typos). | --03Dec10 Put HISTORY comments to log major changes (not typos). | ||
| + | --03Dec10 New parameter {t} template name (default: t=Ifexpr). | ||
-- | -- | ||
--> | --> | ||
{{documentation}} | {{documentation}} | ||
</noinclude> | </noinclude> | ||
Revision as of 17:46, 3 December 2010
ERROR: invalid parameters for Template:Ifexpr:
{{Ifexpr|{{{3}}}|{{{1}}}|{{{2}}}}}
Parameter 1 must be empty when using "1=" format.
The Template:If/errmsg is used to display advisory messages for either the Template:If or also for Template:Ifexpr which can process if-expressions without removing the leading or trailing spaces within then/else clauses of the logic.
- Usage: {{If/errmsg |{{{2|}}}|{{{3|}}}|{{{1|}}}|t=templatename}}
The template passes the values of parameters {1}, {2}, {3} and {t} (the template name, such as t=Ifexpr) so that they can be displayed to clue the reader into spotting which instance (of using Template:If or Template:Ifexpr) had triggered the message.
| The above documentation is transcluded from Template:If/errmsg/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |