Difference between revisions of "Template:Evaldemo/3/doc"

From blackwiki
Jump to navigation Jump to search
imported>Happy-melon
(rm deleted cat)
imported>Zyxw
m (Since <tt> is obsolete in HTML5, replace it with <kbd> – see HTML element#tt, Wikipedia:HTML5, and mw:Help:Extension:Linter/obsolete-tag. using AWB)
Line 2: Line 2:
  
 
;Usage&#58;
 
;Usage&#58;
:{{Tlx|Evaldemo/3|left side|</tt>up to 3 additional parameters}}
+
:{{Tlx|Evaldemo/3|left side|</kbd>up to 3 additional parameters}}
:{{Tlx|Evaldemo/3|left side|</tt>up to 3 additional parameters|4=s=separator}}
+
:{{Tlx|Evaldemo/3|left side|</kbd>up to 3 additional parameters|4=s=separator}}
:The default separator is "'''gives'''", use <tt>s==</tt> to get "'''='''". The first parameter has to be specified and can't be empty, compare {{Lts|evaldemo}}. Please note that for [[Help:colon function|colon function]]s the first parameter belongs to the left side before the "'''|'''" ''vertical bar'' aka ''pipe'', use {{Tlx|evaldemo}} for examples without any ''vertical bar''.
+
:The default separator is "'''gives'''", use <kbd>s==</kbd> to get "'''='''". The first parameter has to be specified and can't be empty, compare {{Lts|evaldemo}}. Please note that for [[Help:colon function|colon function]]s the first parameter belongs to the left side before the "'''|'''" ''vertical bar'' aka ''pipe'', use {{Tlx|evaldemo}} for examples without any ''vertical bar''.
 
;Examples&#58;
 
;Examples&#58;
 
:#{{Tlx|Evaldemo/3|#ifeq: 1.00|+1|okay}}
 
:#{{Tlx|Evaldemo/3|#ifeq: 1.00|+1|okay}}
 
:#:{{Evaldemo/3|#ifeq: 1.00|+1|okay}}
 
:#:{{Evaldemo/3|#ifeq: 1.00|+1|okay}}
:#{{Tlx|Evaldemo/3|#ifeq: this|that</tt><small>&#160;</small><tt><nowiki>|</nowiki></tt><small>&#160;</small><tt>true</tt><small>&#160;</small><tt><nowiki>|</nowiki></tt><small>&#160;</small><tt>false|4=s=is}}
+
:#{{Tlx|Evaldemo/3|#ifeq: this|that</kbd><small>&#160;</small><kbd><nowiki>|</nowiki></kbd><small>&#160;</small><kbd>true</kbd><small>&#160;</small><kbd><nowiki>|</nowiki></kbd><small>&#160;</small><kbd>false|4=s=is}}
 
:#:{{Evaldemo/3|#ifeq: this|that|true|false|s=is}}
 
:#:{{Evaldemo/3|#ifeq: this|that|true|false|s=is}}
  
Optional substitution with <tt>subst=subst:</tt> is '''not''' supported. It's anyway against the spirit of this demo template showing what another template actually '''does''', and not what it '''did''' some time ago.
+
Optional substitution with <kbd>subst=subst:</kbd> is '''not''' supported. It's anyway against the spirit of this demo template showing what another template actually '''does''', and not what it '''did''' some time ago.
 
<includeonly>
 
<includeonly>
  
 
</includeonly>
 
</includeonly>

Revision as of 15:56, 5 August 2018

Template:Evaldemo/3(edit talk links history) shows the call of a template or predefined template and its result, for documentation.

Usage:
{{Evaldemo/3|left side|up to 3 additional parameters}}
{{Evaldemo/3|left side|up to 3 additional parameters|s=separator}}
The default separator is "gives", use s== to get "=". The first parameter has to be specified and can't be empty, compare Template:Evaldemo(edit talk links history). Please note that for colon functions the first parameter belongs to the left side before the "|" vertical bar aka pipe, use {{evaldemo}} for examples without any vertical bar.
Examples:
  1. {{Evaldemo/3|#ifeq: 1.00|+1|okay}}
    {{ #ifeq: 1.00 | +1 | okay }} gives okay
  2. {{Evaldemo/3|#ifeq: this|that | true | false|s=is}}
    {{ #ifeq: this | that | true | false }} is false

Optional substitution with subst=subst: is not supported. It's anyway against the spirit of this demo template showing what another template actually does, and not what it did some time ago.