User:Rishidigital1055/sandbox


 * 31 March 2015, actually, I had put  on 31 March 2015 and it was substituted with the then current date :)


 * , actually, I had put  on 31 March 2015 and it was substituted with the then current date :) but this particular auto edit is confusing.


 * ✅  results in


 * ✅, rendered when  was entered as wikitext in edit window.




 * ✅ is rendered when   was entered as wikitext in edit window.


 * ✅ is rendered when   was entered as wikitext in edit window.


 * ✅ date=April 2015 is rendered when  was entered as wikitext in edit window.


 * ✅ 1 April 2015 is rendered when  was entered as wikitext in edit window.


 * ✅ is rendered when   was entered as wikitext in edit window.


 * ✅  is rendered when  was entered as wikitext in edit window.


 * ✅  is rendered when   was entered as wikitext in edit window.


 * ❌  is rendered when  was entered as wikitext in edit window.


 * ✅ is rendered when   was entered as wikitext in edit window.


 * ✅ is rendered when   was entered as wikitext in edit window.




 * # is rendered when   was entered as wikitext in edit window.


 * is rendered when was entered as wikitext in edit window.


 * is rendered when was entered as wikitext in edit window.




 * ✅ & is rendered when  was entered as wikitext in edit window. (atleast now)


 * ✅ & is rendered even when  was entered as wikitext in edit window (atleast now).


 * ✅ &amp; is rendered when  was entered as wikitext in edit window.


 * ✅ &amp; is rendered even when  was entered as wikitext in edit window.


 * ✅ &amp;  is rendered when   was entered as wikitext in edit window.


 * ✅  &amp;   is rendered when   was entered as wikitext in edit window. and so on


 * ✅ &amp;amp; is rendered when  was entered as wikitext in edit window.


 * ✅ &amp;amp; is rendered even when  was entered as wikitext in edit window.


 * ✅ &amp;amp;amp; is rendered when  was entered as wikitext in edit window.


 * ✅ &amp;amp;amp; is rendered even when  was entered as wikitext in edit window.


 * ✅  &amp;amp;amp;   is rendered when   was entered as wikitext in edit window. and so on


 * ✅ < is rendered when  was entered as wikitext in edit window. (atleast now)


 * ✅ < is rendered even when  was entered as wikitext in edit window. (atleast now)


 * ✅ &lt; is rendered when  was entered as wikitext in edit window.


 * ✅ &lt; is rendered even when  was entered as wikitext in edit window.


 * &lt; is rendered even when  was entered as wikitext in edit window.


 * ✅ &amp;lt; is rendered when  was entered as wikitext in edit window.


 * ✅ &amp;lt; is rendered even when  was entered as wikitext in edit window.


 * ✅ &amp;lt;  is rendered when   was entered as wikitext in edit window.


 * # is rendered when  was entered as wikitext in edit window.


 * ✅ nowiki is rendered when  was entered as wikitext in edit window.


 * ✅ tag is rendered when  was entered as wikitext in edit window.


 * ✅ is rendered when   was entered as wikitext in edit window.


 * ✅  is rendered when  was entered as wikitext in edit window.

One way to test whether a parameter was specified in a template call is thus:
 * ✅ from mw:Help:Parser_functions_in_templates


 * ✅ [ Edit this page]



When evaluating using boolean algebra, zero evaluates to false and any nonzero value, positive or negative, evaluates to true: → 1    → 0
 * ✅ from mw:Help:Extension:ParserFunctions

An empty input expression returns an empty string. Invalid expressions return one of several error messages, which can be caught using the #iferror function:

→    → Expression error: Missing operand for +. → Expression error: Unrecognized word "foo".

The order of addition and subtraction operands before or after a number is meaningful, and may be treated as a positive or negative value instead of as an operand with an erroneous input:

→ 1    → -1     → 1     → -1


 * ✅ from mw:Help:Extension:ParserFunctions

This function first tests whether the first parameter is not empty. If the first parameter is not empty the function displays the second argument. If the first parameter is empty or contains only whitespace characters (spaces, newlines, etc.) it displays the third argument.

→ no    → yes → no    → no

The test string is always interpreted as pure text, so mathematical expressions are not evaluated:

→ yes → yes

The last parameter (false) may be omitted:

→ yes →    →

The function may be nested. To do so, nest the inner #if function in its full form in place of a parameter of the enclosing #if function. A depth of at least seven levels of nesting is possible, although that may depend on the wiki or a memory limit.

Example:

You can also use a parameter as the test string in your #if statement. You need to ensure you add the | (pipe symbol) after the name of the variable.

Example


 * ✅ from mw:Help:Parser_functions_in_templates

Sample A

Result

Sample B

Result when was enetered.

Tags and parser functions inside parser tags (such as  ) are temporarily replaced by a unique code. This affects comparisons:
 * ✅ from mw:Help:Extension:ParserFunctions

→    →     →     →  

→ '  → '   → '   → '   →    → &zwnj; → '  → '
 * ✅ from mw:Help:Extension:ParserFunctions

→   → Expression error: Unexpected = operator →    →    →     →     →     →     →  
 * ✅ from mw:Help:Extension:ParserFunctions


 * ✅ from mw:Help:Extension:ParserFunctions

 →   →   →   →   →   →   →  <tt> → </tt>
 * ✅ from w:Template:Dec2hex

Specify how many digits are shown [2,8]. Example: <tt> → </tt>
 * digits


 * ✅ from w:Template:Ns

a   b    c    dd

a   b    c    d    d

,   ,     ,     ,     ,     ,.
 * ✅ from mw:Help:Magic_words

,   ,     ,     ,     ,     ,.

,, , , , ,

,, , , , ,

In directly and indirectly substituted templates, again only templates with subst: or safesubst: are expanded.
 * ✅✅ from mw:Help:Substitution

, yes, yes,. , yes, no,.

, yes, yes,. Talk, yes, yes,.


 * Example&#58;, containing
 * <tt> start--middle--end </tt>
 * and called as <tt> a </tt> (see tc) gives the wikitext:
 * <tt> start-a-middle--end </tt>, rendering as
 * start-a-middle--end.

<tt> </tt> gives IN, the same wikitext as  is expanded to; UC: is applied to the output "in" of Tc. <tt> </tt> gives File. <tt>     </tt> gives wikitext      rendered as. gives the wikitext startHelpend (see t1) gives the wikitext start12end gives the wikitext startABCDEFend gives the wikitext 1331 because gives, 11*  also gives 11*11*11* and finally,  , gives. gives the wikitext ABCABCABC (see 3X) gives the wikitext 1e-05 (see LC:) gives (at the time of writing) the wikitext 30 gives (at the time of writing) the wikitext THURSDAY

However: <tt> </tt> gives the wikitext   rendered as. <tt> </tt> stays , rendered as  (see ns:).

added an anchor on this mediawiki page

here

here


 * a
 * b