Template:Evaldemo/3

From OrthodoxWiki

Jump to: navigation, search

Template:Hh Template:Evaldemo/3 (edit talk links history)

shows the call of a template or predefined template and its result, for documentation.
Usage:
{{Evaldemo/3{{#if:left side|

|left side }}{{#if:up to 3 additional parameters| |</tt>up to 3 additional parameters }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}</tt>

{{Evaldemo/3{{#if:left side|

|left side }}{{#if:up to 3 additional parameters| |</tt>up to 3 additional parameters }}{{#if:s=separator| |s=separator }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}</tt>

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 parser functions the first parameter belongs to the left side before the "|" vertical bar aka pipe, use {{evaldemo{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}

for examples without any vertical bar.
Examples:
  1. {{Evaldemo/3{{#if:#ifeq: 1.00|

|#ifeq: 1.00 }}{{#if:+1| |+1 }}{{#if:okay| |okay }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}

  1. {{ #ifeq: 1.00|+1{{#ifeq:+|-||okay||{{#ifeq:okay|okay||okay }} }}}} {{#ifeq: +|-|{{{s}}}|gives}} {{#ifeq:-|+|{{#ifeq: 1.00|+1|okay|}}|{{#ifeq:okay|okay|{{#ifeq: 1.00|+1|okay}}|{{#ifeq: 1.00|+1}}}}}}
  1. {{Evaldemo/3{{#if:#ifeq: this|

|#ifeq: this }}{{#if:that<tt>||false| |that||false }}{{#if:s=is| |s=is }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}</tt>

  1. {{ #ifeq: this|that{{#ifeq:false|false|||false|{{#ifeq:||| }} }}}} {{#ifeq: is|is|is|gives}} {{#ifeq:false|false|{{#ifeq: this|that||false}}|{{#ifeq:||{{#ifeq: this|that|}}|{{#ifeq: this|that}}}}}}


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.

Personal tools
pan-wiki Google Search