Template:Boolandnoteq: Difference between revisions

From railML 2 Wiki
Jump to navigation Jump to search
[checked revision][checked revision]
(Created page with "<includeonly>{{#if: {{{1|}}} | {{#ifeq: {{{2|}}}|{{{3|}}}| | 1 }} }}</includeonly><noinclude> ==Usage== This template returns a string, if the first argument exists and the se...")
 
 
Line 12: Line 12:
<pre>{{boolandnoteq||SNCF|ÖBB}}</pre>returns nothing
<pre>{{boolandnoteq||SNCF|ÖBB}}</pre>returns nothing
<pre>{{boolandnoteq|DB|ÖBB|ÖBB}}</pre>returns nothing
<pre>{{boolandnoteq|DB|ÖBB|ÖBB}}</pre>returns nothing
[[category:template]]</noinclude>
 
[[category:ContentTemplate]]
</noinclude>

Latest revision as of 11:17, 19 August 2019

Usage

This template returns a string, if the first argument exists and the second and the third argument differ from each other. It is employed in template:ElementDocu to handle the case: ownAttributes exists and is not None: {{boolandnoteq|{{ownAttributes|}}|{{ownAttributes}}|''None''}}

Arguments

The template has three obligatory, unnamed arguments:

  • 1: The argument to exist
  • 2: The first argument to compare. e.g. a variable
  • 3: The second argument to compare. e.g. a string or another variable

Example

{{boolandnoteq|DB|SNCF|ÖBB}}

returns 1

{{boolandnoteq||SNCF|ÖBB}}

returns nothing

{{boolandnoteq|DB|ÖBB|ÖBB}}

returns nothing