Difference between revisions of "Template:If/errmsg"

From blackwiki
Jump to navigation Jump to search
imported>Wikid77
(new parameter {t} for template name; reversed parameters to match parameter sequence as passed by Template:Ifexpr - not using parameter {4})
imported>WOSlinker
(tidy style for better HTML5 compatibility)
 
(One intermediate revision by one other user not shown)
Line 6: Line 6:
 
-
 
-
 
--></noinclude><br>
 
--></noinclude><br>
<font color="#FF5511">'''ERROR: invalid parameters for [[Template:{{{t|Ifexpr}}}]]''':<br>&nbsp; <nowiki>{{</nowiki>{{{t|Ifexpr}}}|{{{3}}}|{{{1}}}|{{{2}}}<nowiki>}}</nowiki><br>&nbsp; Parameter 1 must be empty when using "1=" format.</font><noinclude>
+
<span style="color:#FF5511;">'''ERROR: invalid parameters for [[Template:{{{t|Ifexpr}}}]]''':<br>&nbsp; <nowiki>{{</nowiki>{{{t|Ifexpr}}}...|{{{3}}}|{{{1}}}|{{{2}}}<nowiki>}}</nowiki><br>&nbsp; Check for invalid numbers, or parameter 1 must be empty when using "1=" format.</span><noinclude>
 
<!--
 
<!--
 
--------------------------------------------------------------
 
--------------------------------------------------------------
Line 26: Line 26:
 
--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).
 
--03Dec10 New parameter {t} template name (default: t=Ifexpr).
 +
--03Dec10 Added "Check for invalid numbers, or...".
 
--
 
--
 
-->
 
-->
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 12:56, 8 July 2015


ERROR: invalid parameters for Template:Ifexpr:
  {{Ifexpr...|{{{3}}}|{{{1}}}|{{{2}}}}}
  Check for invalid numbers, or parameter 1 must be empty when using "1=" format.

Template documentation[view] [edit] [history] [purge]

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.